2017-05-12 11:08:57 +01:00
|
|
|
---
|
|
|
|
- name: Ensure external network and subnet are registered in neutron
|
|
|
|
# Only required to run on a single host.
|
|
|
|
hosts: controllers[0]
|
|
|
|
roles:
|
2017-11-17 10:35:01 +00:00
|
|
|
- role: stackhpc.os-networks
|
2018-08-01 18:49:50 +01:00
|
|
|
os_shade_install_epel: "{{ yum_install_epel }}"
|
2017-11-17 10:35:01 +00:00
|
|
|
os_networks_venv: "{{ virtualenv_path }}/shade"
|
|
|
|
os_networks_openstack_auth_type: "{{ openstack_auth_type }}"
|
|
|
|
os_networks_openstack_auth: "{{ openstack_auth }}"
|
2017-05-12 11:08:57 +01:00
|
|
|
# Network configuration.
|
2017-11-30 18:26:52 +00:00
|
|
|
os_networks_name: "{{ item }}"
|
|
|
|
os_networks_type: "{% if item | net_vlan %}vlan{% else %}flat{% endif %}"
|
2017-11-17 10:35:01 +00:00
|
|
|
os_networks_physical_network: "physnet1"
|
2017-11-30 18:26:52 +00:00
|
|
|
os_networks_segmentation_id: "{{ item | net_vlan }}"
|
2017-11-17 10:35:01 +00:00
|
|
|
os_networks_shared: True
|
|
|
|
os_networks_external: True
|
2017-05-12 11:08:57 +01:00
|
|
|
# Subnet configuration.
|
2017-11-30 18:26:52 +00:00
|
|
|
os_networks_subnet_name: "{{ item }}"
|
|
|
|
os_networks_cidr: "{{ item | net_cidr }}"
|
|
|
|
os_networks_gateway_ip: "{{ item | net_gateway }}"
|
|
|
|
os_networks_allocation_pool_start: "{{ item | net_neutron_allocation_pool_start }}"
|
|
|
|
os_networks_allocation_pool_end: "{{ item | net_neutron_allocation_pool_end }}"
|
|
|
|
with_items: "{{ external_net_names }}"
|