mirror of
https://opendev.org/openstack/ansible-collections-openstack.git
synced 2026-07-29 11:14:30 +00:00
Run functional devstack job on ansible collection
Porting of job that was running on patches in Ansible. Change-Id: Ifa5a6b40d6a0f1de9f2cbc917a55c2d0e8ac421d
This commit is contained in:
2
ci/roles/subnet/defaults/main.yml
Normal file
2
ci/roles/subnet/defaults/main.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
subnet_name: shade_subnet
|
||||
enable_subnet_dhcp: false
|
||||
43
ci/roles/subnet/tasks/main.yml
Normal file
43
ci/roles/subnet/tasks/main.yml
Normal file
@@ -0,0 +1,43 @@
|
||||
---
|
||||
- name: Create network {{ network_name }}
|
||||
openstack.cloud.os_network:
|
||||
cloud: "{{ cloud }}"
|
||||
name: "{{ network_name }}"
|
||||
state: present
|
||||
|
||||
- name: Create subnet {{ subnet_name }} on network {{ network_name }}
|
||||
openstack.cloud.os_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.os_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.os_subnet:
|
||||
cloud: "{{ cloud }}"
|
||||
name: "{{ subnet_name }}"
|
||||
state: absent
|
||||
|
||||
- name: Delete network {{ network_name }}
|
||||
openstack.cloud.os_network:
|
||||
cloud: "{{ cloud }}"
|
||||
name: "{{ network_name }}"
|
||||
state: absent
|
||||
Reference in New Issue
Block a user