F #2645: Generalisation of vxlan playbook (#2931)

This commit is contained in:
Alejandro Huertas Herrero authored and Tino Vázquez committed 2019-02-13 18:35:15 +01:00
1 parent 633b9616cc
commit e04ec57f9d
3 files changed
+5 -4

No files matched your search

@@ -20,8 +20,9 @@ iptables_base_rules_strict: false
# Parameters for static VXLAN connections between provisioned hosts
opennebula_p2p_vxlan_bridge: vxbr100
opennebula_p2p_vxlan_phydev: bond0:0
opennebula_p2p_vxlan_phydev: "{{ ansible_interfaces | sort | select('in', ['bond0_0', 'eth0']) | first | replace('_', ':') }}"
ansible_phydev: "ansible_{{ ansible_interfaces | sort | select('in', ['bond0_0', 'eth0']) | first }}"
opennebula_p2p_vxlan_vxlan_vni: 100
opennebula_p2p_vxlan_vxlan_dev: vxlan100
opennebula_p2p_vxlan_vxlan_local_ip: '{{ ansible_facts["bond0_0"]["ipv4"]["address"] }}'
opennebula_p2p_vxlan_remotes: "{{ groups['nodes'] | map('extract', hostvars, ['ansible_bond0_0', 'ipv4', 'address']) | list }}"
opennebula_p2p_vxlan_vxlan_local_ip: '{{ ansible_facts[opennebula_p2p_vxlan_phydev | replace(":", "_")]["ipv4"]["address"] }}'
opennebula_p2p_vxlan_remotes: "{{ groups['nodes'] | map('extract', hostvars, [ansible_phydev, 'ipv4', 'address']) | list }}"
@@ -1,6 +1,6 @@
---
version: 2
playbook: vxlan_packet
playbook: static_vxlan
networks:
- name: "nat"