Execution
Date
08 Dec 2025 13:39:52 +0000
Duration
00:35:02.03
Controller
aio1.openstack.local
User
root
Versions
Ansible
2.18.6
ara
1.7.4 / 1.7.4
Python
3.12.3
Summary
2
Hosts
1377
Tasks
1365
Results
104
Plays
504
Files
0
Records
File: /etc/ansible/ansible_collections/openstack/osa/roles/openstack_resources/tasks/network.yml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | --- # Copyright 2023, Cleura AB. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. - name: Create address scopes openstack.cloud.address_scope: cloud: "{{ openstack_resources_cloud_name }}" interface: "{{ openstack_resources_interface }}" name: "{{ scope['name'] }}" ip_version: "{{ scope['ip_version'] | default(4) }}" is_shared: "{{ scope['shared'] | default(false) }}" project: "{{ scope['project'] | default(omit) }}" state: "{{ scope['state'] | default('present') }}" loop: "{{ openstack_resources_network['address_scopes'] | default([]) }}" loop_control: loop_var: "scope" label: "{{ loop_label | to_json }}" vars: loop_label: name: "{{ scope['name'] }}" state: "{{ scope['state'] | default('present') }}" shared: "{{ scope['shared'] | default('false') }}" ip_version: "{{ scope['ip_version'] | default(4) }}" - name: Create subnet pools openstack.cloud.subnet_pool: cloud: "{{ openstack_resources_cloud_name }}" interface: "{{ openstack_resources_interface }}" name: "{{ pool['name'] }}" project: "{{ pool['project'] | default(omit) }}" description: "{{ pool['description'] | default(omit) }}" address_scope: "{{ pool['address_scope'] | default(omit) }}" prefixes: "{{ pool['prefixes'] | default(omit) }}" default_prefix_length: "{{ pool['default_prefix'] | default(omit) }}" maximum_prefix_length: "{{ pool['max_prefix'] | default(omit) }}" minimum_prefix_length: "{{ pool['min_prefix'] | default(omit) }}" default_quota: "{{ pool['quota'] | default(omit) }}" extra_specs: "{{ pool['extra_specs'] | default(omit) }}" is_default: "{{ pool['default'] | default(false) }}" is_shared: "{{ pool['shared'] | default(false) }}" state: "{{ pool['state'] | default('present') }}" loop: "{{ openstack_resources_network['subnet_pools'] | default([]) }}" loop_control: loop_var: "pool" label: "{{ loop_label | to_json }}" vars: loop_label: name: "{{ pool['name'] }}" state: "{{ pool['state'] | default('present') }}" shared: "{{ pool['shared'] | default('false') }}" default: "{{ pool['default'] | default('false') }}" - name: Create network openstack.cloud.network: cloud: "{{ openstack_resources_cloud_name }}" interface: "{{ openstack_resources_interface }}" name: "{{ network['name'] }}" state: "{{ network['state'] | default(omit) }}" external: "{{ network['external'] | default(omit) }}" shared: "{{ network['shared'] | default(omit) }}" project: "{{ network['project'] | default(omit) }}" mtu_size: "{{ network['mtu'] | default(omit) }}" provider_network_type: "{{ network['network_type'] | default(omit) }}" provider_physical_network: "{{ network['physical_network'] | default(omit) }}" provider_segmentation_id: "{{ network['segmentation_id'] | default(omit) }}" loop: "{{ openstack_resources_network['networks'] | default([]) }}" register: _provisioned_networks loop_control: loop_var: "network" label: "{{ loop_label | to_json }}" vars: loop_label: name: "{{ network['name'] }}" state: "{{ network['state'] | default('present') }}" external: "{{ network['external'] | default('false') }}" shared: "{{ network['shared'] | default('false') }}" - name: Creating subnets for each network ansible.builtin.include_tasks: file: network_subnets.yml loop: "{{ openstack_resources_network['networks'] | default([]) | selectattr('subnets', 'defined') }}" loop_control: loop_var: network - name: Creating routers openstack.cloud.router: cloud: "{{ openstack_resources_cloud_name }}" interface: "{{ openstack_resources_interface }}" name: "{{ router['name'] }}" network: "{{ router['network'] | default(omit) }}" interfaces: "{{ router['interfaces'] | default(omit) }}" enable_snat: "{{ router['snat'] | default(omit) }}" external_fixed_ips: "{{ router['fixed_ips'] | default(omit) }}" project: "{{ router['project'] | default(omit) }}" state: "{{ router['state'] | default(omit) }}" loop: "{{ openstack_resources_network['routers'] | default([]) }}" loop_control: loop_var: router - name: Creating security groups openstack.cloud.security_group: cloud: "{{ openstack_resources_cloud_name }}" interface: "{{ openstack_resources_interface }}" name: "{{ security_group['name'] }}" description: "{{ security_group['description'] | default(omit) }}" project: "{{ security_group['project'] | default(omit) }}" state: "{{ security_group['state'] | default('present') }}" security_group_rules: "{{ security_group['security_group_rules'] | default(omit) }}" loop: "{{ openstack_resources_network['security_groups'] | default([]) }}" loop_control: loop_var: security_group |