-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
94202c2
commit 961a6db
Showing
7 changed files
with
125 additions
and
221 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
--- | ||
- include_tasks: networks.yml | ||
- include_tasks: flavors.yml | ||
- include_tasks: images.yml | ||
- include_tasks: reservations.yml |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,77 @@ | ||
--- | ||
|
||
# all of this section is only needed for backwards compatibility | ||
public_networks: "{{ neutron_networks | selectattr('public', 'defined') | list }}" | ||
# This is added for backwards compatibility | ||
named_public_networks: "{{ neutron_networks | selectattr('name', 'equalto', 'public') | list }}" | ||
all_public_networks: "{{ public_networks + named_public_networks }}" | ||
public_network: "{{ all_public_networks[0] if all_public_networks }}" | ||
public_network_physnet: "{{ all_public_networks[0] if all_public_networks }}" | ||
public_network: "{{ public_network_physnet.public }}" | ||
|
||
shared_networks: "{{ neutron_networks | selectattr('sharednet', 'defined') | list }}" | ||
shared_network: "{{ shared_networks[0] if shared_networks }}" | ||
shared_network_physnet: "{{ shared_networks[0] if shared_networks }}" | ||
shared_network: "{{ shared_network_physnet.sharednet }}" | ||
|
||
provisioning_networks: "{{ neutron_networks | selectattr('provisioning', 'defined') | list }}" | ||
provisioning_network_physnet: "{{ provisioning_networks[0] if provisioning_networks }}" | ||
provisioning_network: "{{ provisioning_network_physnet.provisioning }}" | ||
|
||
|
||
# At this point, we've identified candidates for the public and shared networks, | ||
# and their physical networks, in a backwards compatible way. | ||
# We use the dicts below to set default values, as well as once that can be skipped | ||
# if omitted. | ||
|
||
post_deploy_networks: | ||
default_public: | ||
name: public | ||
enabled: True | ||
shared: false | ||
external: true | ||
provider_network_type: "{{ public_network.segment_type | default('flat') }}" | ||
provider_segmentation_id: "{{ public_network.segment_id | default(omit) }}" | ||
provider_physical_network: "{{ public_network_physnet.name | default('physnet1') }}" | ||
subnet: | ||
name: public_subnet | ||
cidr: "{{ public_network.cidr }}" | ||
gateway_ip: "{{ public_network.gateway }}" | ||
dhcp: false | ||
allocation_pool_start: "{{ public_network.ip_range_start }}" | ||
allocation_pool_end: "{{ public_network.ip_range_end }}" | ||
default_sharednet: | ||
name: sharednet1 | ||
enabled: True | ||
shared: true | ||
external: false | ||
provider_network_type: "{{ shared_network.segment_type | default('vlan') }}" | ||
provider_segmentation_id: "{{ shared_network.segment_id | default(omit) }}" | ||
provider_physical_network: "{{ shared_network_physnet.name | default('physnet1') }}" | ||
subnet: | ||
name: sharednet_subnet | ||
cidr: "{{ shared_network.cidr | default('10.0.0.1/24')}}" | ||
gateway_ip: "{{ shared_network.gateway | default(omit)}}" | ||
dhcp: true | ||
allocation_pool_start: "{{ shared_network.cidr | next_nth_usable(3) }}" # leave room for gw and dhcp | ||
allocation_pool_end: "{{ shared_network.cidr | ipaddr('last_usable') }}" | ||
ironic_provisioning: | ||
name: ironic_provisioning | ||
enabled: "{{ enable_ironic | bool }}" | ||
shared: false | ||
external: false | ||
provider_network_type: "{{ provisioning_network.segment_type | default('vlan') }}" | ||
provider_segmentation_id: "{{ provisioning_network.segment_id | default(omit) }}" | ||
provider_physical_network: "{{ provisioning_network_physnet.name | default('physnet1') }}" | ||
subnet: | ||
name: ironic_provisioning_subnet | ||
dhcp: true | ||
cidr: "{{ provisioning_network.cidr | default('10.51.0.0/24' )}}" | ||
gateway_ip: "{{ provisioning_network.cidr | next_nth_usable(1) }}" | ||
allocation_pool_start: "{{ provisioning_network.cidr | next_nth_usable(3) }}" # leave room for gw and dhcp | ||
allocation_pool_end: "{{ provisioning_network.cidr | ipaddr('last_usable') }}" | ||
|
||
default_sharednet_name: sharednet1 | ||
default_sharednet_cidr: 10.0.0.1/24 | ||
|
||
# Default to using the external VIP interface for NAT | ||
corsa_nat_external_interface: "{{ kolla_external_vip_interface }}" | ||
post_deploy_routers: | ||
sharednet_router: | ||
name: sharednet_router | ||
interfaces: | ||
- "{{ post_deploy_networks.default_sharednet.subnet.name }}" | ||
network: "{{ post_deploy_networks.default_public.name }}" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,56 @@ | ||
--- | ||
- name: configure public network and subnet | ||
include_tasks: public.yml | ||
- name: configure shared tenant network(s) and subnet(s) | ||
include_tasks: sharednet.yml | ||
- name: configure corsa nat interface | ||
include_tasks: corsa_nat.yml | ||
- name: Ensuring post-deploy networks exist | ||
with_dict: "{{ post_deploy_networks }}" | ||
vars: | ||
network: "{{ item.value }}" | ||
kolla_toolbox: | ||
module_name: os_network | ||
module_args: | ||
auth: "{{ openstack_auth }}" | ||
project: "{{ keystone_admin_project }}" | ||
name: "{{ network.name }}" | ||
provider_network_type: "{{ network.provider_network_type }}" | ||
provider_segmentation_id: "{{ network.provider_segmentation_id }}" | ||
provider_physical_network: "{{ network.provider_physical_network }}" | ||
external: "{{ network.external }}" | ||
shared: "{{ network.shared }}" | ||
state: present | ||
become: true | ||
run_once: True | ||
when: | ||
- item.value.enabled | ||
|
||
- name: Ensuring post-deploy subnets exist | ||
with_dict: "{{ post_deploy_networks }}" | ||
vars: | ||
network: "{{ item.value }}" | ||
subnet: "{{ item.value.subnet }}" | ||
kolla_toolbox: | ||
module_name: os_subnet | ||
module_args: | ||
auth: "{{ openstack_auth }}" | ||
project: "{{ keystone_admin_project }}" | ||
network_name: "{{ network.name }}" | ||
name: "{{ subnet.name }}" | ||
cidr: "{{ subnet.cidr }}" | ||
gateway_ip: "{{ subnet.gateway_ip | default(omit) }}" | ||
enable_dhcp: "{{ subnet.dhcp }}" | ||
allocation_pool_start: "{{ subnet.allocation_pool_start }}" | ||
allocation_pool_end: "{{ subnet.allocation_pool_end }}" | ||
become: true | ||
run_once: True | ||
when: | ||
- item.value.enabled | ||
|
||
- name: Create NAT router for shared network(s). | ||
kolla_toolbox: | ||
module_name: os_router | ||
module_args: | ||
auth: "{{ openstack_auth }}" | ||
project: "{{ keystone_admin_project }}" | ||
name: "{{ item.value.name }}" | ||
interfaces: "{{ item.value.interfaces }}" | ||
network: "{{ item.value.network }}" | ||
become: true | ||
run_once: True | ||
with_dict: "{{ post_deploy_routers }}" |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.