mirror of
https://opendev.org/openstack/ansible-collections-openstack.git
synced 2026-05-06 21:33:07 +00:00
Change-Id: Ief843310ce57a2d1062d86c54cd7ad6e0f705b68
(cherry picked from commit 85fa2bb2b6)
71 lines
1.9 KiB
YAML
71 lines
1.9 KiB
YAML
---
|
|
- name: Download Amphora tarball
|
|
get_url:
|
|
url: "https://tarballs.openstack.org/octavia/test-images/test-only-amphora-x64-haproxy-ubuntu-bionic.qcow2"
|
|
dest: /tmp/test-only-amphora-x64-haproxy-ubuntu-bionic.qcow2
|
|
|
|
- name: Upload Amphora image for Octavia to test load balancers
|
|
openstack.cloud.image:
|
|
cloud: "{{ cloud }}"
|
|
container_format: bare
|
|
disk_format: qcow2
|
|
filename: /tmp/test-only-amphora-x64-haproxy-ubuntu-bionic.qcow2
|
|
is_public: false
|
|
name: test-only-amphora-x64-haproxy-ubuntu-bionic
|
|
owner: service
|
|
properties:
|
|
hw_architecture: x86_64
|
|
hw_rng_model: virtio
|
|
state: present
|
|
tags:
|
|
- amphora
|
|
|
|
- name: Create network {{ network_name }} for LB
|
|
openstack.cloud.network:
|
|
cloud: "{{ cloud }}"
|
|
name: "{{ network_name }}"
|
|
state: present
|
|
|
|
- name: Create subnet {{ subnet_name }} on network {{ network_name }} for LB
|
|
openstack.cloud.subnet:
|
|
cloud: "{{ cloud }}"
|
|
network_name: "{{ network_name }}"
|
|
name: "{{ subnet_name }}"
|
|
state: present
|
|
enable_dhcp: true
|
|
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: Create loadbalancer - generic
|
|
openstack.cloud.loadbalancer:
|
|
cloud: "{{ cloud }}"
|
|
state: present
|
|
name: "{{ lb_name }}"
|
|
vip_subnet: "{{ subnet_name }}"
|
|
timeout: 450
|
|
|
|
- name: Delete loadbalancer
|
|
openstack.cloud.loadbalancer:
|
|
cloud: "{{ cloud }}"
|
|
state: absent
|
|
name: "{{ lb_name }}"
|
|
timeout: 150
|
|
|
|
- name: Delete subnet {{ subnet_name }} on network {{ network_name }}
|
|
openstack.cloud.subnet:
|
|
cloud: "{{ cloud }}"
|
|
network_name: "{{ network_name }}"
|
|
name: "{{ subnet_name }}"
|
|
state: absent
|
|
|
|
- name: Delete network {{ network_name }} of LB
|
|
openstack.cloud.network:
|
|
cloud: "{{ cloud }}"
|
|
name: "{{ network_name }}"
|
|
state: absent
|