mirror of
https://opendev.org/openstack/ansible-collections-openstack.git
synced 2026-05-06 21:33:07 +00:00
This is separate from the previous patch - it's just the results of running the script so we can review the two a little independently. We should probably squash them. Change-Id: I838f15cf4a32455a5be20033c8ddc27db6ca15c0
47 lines
1.1 KiB
YAML
47 lines
1.1 KiB
YAML
---
|
|
- name: Create network {{ network_name }}
|
|
openstack.cloud.network:
|
|
cloud: "{{ cloud }}"
|
|
name: "{{ network_name }}"
|
|
state: present
|
|
|
|
- name: Create subnet {{ subnet_name }} on network {{ network_name }}
|
|
openstack.cloud.subnet:
|
|
cloud: "{{ cloud }}"
|
|
network_name: "{{ network_name }}"
|
|
name: "{{ subnet_name }}"
|
|
state: present
|
|
enable_dhcp: "{{ enable_subnet_dhcp }}"
|
|
dns_nameservers:
|
|
- 8.8.8.7
|
|
- 8.8.8.8
|
|
cidr: 192.168.0.0/24
|
|
gateway_ip: 192.168.0.1
|
|
allocation_pool_start: 192.168.0.2
|
|
allocation_pool_end: 192.168.0.254
|
|
|
|
- name: Update subnet
|
|
openstack.cloud.subnet:
|
|
cloud: "{{ cloud }}"
|
|
network_name: "{{ network_name }}"
|
|
name: "{{ subnet_name }}"
|
|
state: present
|
|
dns_nameservers:
|
|
- 8.8.8.7
|
|
cidr: 192.168.0.0/24
|
|
|
|
- name: Delete subnet {{ subnet_name }}
|
|
openstack.cloud.subnet:
|
|
cloud: "{{ cloud }}"
|
|
name: "{{ subnet_name }}"
|
|
state: absent
|
|
|
|
- name: Delete network {{ network_name }}
|
|
openstack.cloud.network:
|
|
cloud: "{{ cloud }}"
|
|
name: "{{ network_name }}"
|
|
state: absent
|
|
|
|
- name: Subnet Allocation
|
|
include_tasks: subnet-allocation.yml
|