kayobe/ansible/ip-allocation.yml
Mark Goddard 26be2c5af3 Support Neutron VLAN networks
For VLAN networks we need to use a tagged Linux bridge on the controller with a
veth pair to link it to the corresponding Neutron OVS bridge. This must be done
for the physical network(s) carrying the provisioning, tenant, and external
network traffic. We also need untagged VLAN subinterfaces on the tagged bridge
for the controller to communicate on these networks with.

The network interface role in use requires that we use two passes through
interface configuration to ensure that VLAN subinterfaces can be added to
bridge interfaces.

Finally, we must configure Ironic with the name of the Neutron network used
for provisioning.
2017-03-24 16:14:48 +00:00

30 lines
951 B
YAML

---
- name: Ensure IP addresses are allocated
hosts: seed:controllers
gather_facts: no
pre_tasks:
- name: Initialise the IP allocations fact
set_fact:
ip_allocations: []
- name: Update the IP allocations fact with IP allocation requests
set_fact:
ip_allocations: >
{{
ip_allocations +
[{
'net_name': item,
'cidr': item|net_cidr,
'allocation_pool_start': item|net_allocation_pool_start,
'allocation_pool_end': item|net_allocation_pool_end
}]
}}
with_items: "{{ network_interfaces }}"
when: "{{ item|net_cidr != None }}"
roles:
- role: ip-allocation
ip_allocation_filename: "{{ kayobe_config_path }}/network-allocation.yml"
ip_allocation_hostname: "{{ inventory_hostname }}"
# Use serial=1 to avoid races between allocations for different hosts.
serial: 1