4ca2d41762
Second part of patchset: https://review.opendev.org/c/openstack/kolla-ansible/+/799229/ in which was suggested to split patch into smaller ones. THis change adds container_engine to module parameters so when we introduce podman, kolla_toolbox can be used for both engines. Signed-off-by: Ivan Halomi <i.halomi@partner.samsung.com> Co-authored-by: Martin Hiner <m.hiner@partner.samsung.com> Change-Id: Ic2093aa9341a0cb36df8f340cf290d62437504ad
72 lines
2.3 KiB
YAML
72 lines
2.3 KiB
YAML
---
|
|
- name: Get amphora flavor info
|
|
become: true
|
|
kolla_toolbox:
|
|
container_engine: "{{ kolla_container_engine }}"
|
|
module_name: os_flavor_info
|
|
module_args:
|
|
auth: "{{ octavia_user_auth }}"
|
|
cacert: "{{ openstack_cacert }}"
|
|
endpoint_type: "{{ openstack_interface }}"
|
|
region_name: "{{ openstack_region_name }}"
|
|
name: "{{ octavia_amp_flavor.name }}"
|
|
run_once: True
|
|
delegate_to: "{{ groups['octavia-api'][0] }}"
|
|
register: flavor_results
|
|
|
|
- name: Get {{ octavia_service_auth_project }} project id
|
|
become: True
|
|
kolla_toolbox:
|
|
container_engine: "{{ kolla_container_engine }}"
|
|
module_name: os_project_info
|
|
module_args:
|
|
auth: "{{ octavia_user_auth }}"
|
|
cacert: "{{ openstack_cacert }}"
|
|
endpoint_type: "{{ openstack_interface }}"
|
|
region_name: "{{ openstack_region_name }}"
|
|
name: "{{ octavia_service_auth_project }}"
|
|
run_once: True
|
|
delegate_to: "{{ groups['octavia-api'][0] }}"
|
|
register: project_info
|
|
|
|
# NOTE(wuchunyang): ansible doesn't have a module to query security groups
|
|
# let's use os_security_group module instead.
|
|
- name: Get security groups for octavia
|
|
become: true
|
|
kolla_toolbox:
|
|
container_engine: "{{ kolla_container_engine }}"
|
|
module_name: os_security_group
|
|
module_args:
|
|
auth: "{{ octavia_user_auth }}"
|
|
cacert: "{{ openstack_cacert }}"
|
|
endpoint_type: "{{ openstack_interface }}"
|
|
region_name: "{{ openstack_region_name }}"
|
|
state: present
|
|
name: "{{ item.name }}"
|
|
loop: "{{ octavia_amp_security_groups.values() | list }}"
|
|
loop_control:
|
|
label: "{{ item.name }}"
|
|
run_once: True
|
|
delegate_to: "{{ groups['octavia-api'][0] }}"
|
|
register: sec_grp_info
|
|
|
|
- name: Get loadbalancer management network
|
|
become: true
|
|
kolla_toolbox:
|
|
container_engine: "{{ kolla_container_engine }}"
|
|
module_name: os_networks_info
|
|
module_args:
|
|
auth: "{{ octavia_user_auth }}"
|
|
cacert: "{{ openstack_cacert }}"
|
|
endpoint_type: "{{ openstack_interface }}"
|
|
region_name: "{{ openstack_region_name }}"
|
|
name: "{{ octavia_amp_network['name'] }}"
|
|
register: network_results
|
|
run_once: True
|
|
delegate_to: "{{ groups['octavia-api'][0] }}"
|
|
|
|
- name: Set octavia resources facts
|
|
set_fact:
|
|
network_info: "{{ network_results.openstack_networks.0 }}"
|
|
amphora_flavor_info: "{{ flavor_results.openstack_flavors.0 }}"
|