Move prechecks into its own role
To avoid many merge conflicts and re-works * Panko * Octavia * Ceph * MariaDB Co-Authored-By: caoyuan <cao.yuan@99cloud.net> Partially-implements: blueprint condition-pre-check Change-Id: I3d2766d0d9f01ad4052731c7219a2d0635527ac5
This commit is contained in:
parent
dee1fb7d99
commit
d53f27caea
@ -1 +1,16 @@
|
||||
---
|
||||
- name: Get container facts
|
||||
kolla_container_facts:
|
||||
name:
|
||||
- ceph_rgw
|
||||
register: container_facts
|
||||
|
||||
- name: Checking free port for RadosGW
|
||||
wait_for:
|
||||
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
|
||||
port: "{{ rgw_port }}"
|
||||
connect_timeout: 1
|
||||
state: stopped
|
||||
when:
|
||||
- container_facts['ceph-rgw'] is not defined
|
||||
- inventory_hostname in groups['ceph-rgw']
|
||||
|
@ -201,6 +201,17 @@
|
||||
- "{{ 'manila_api' not in haproxy_stat }}"
|
||||
- inventory_hostname in groups['haproxy']
|
||||
|
||||
- name: Checking free port for MariaDB HAProxy
|
||||
wait_for:
|
||||
host: "{{ kolla_internal_vip_address }}"
|
||||
port: "{{ database_port }}"
|
||||
connect_timeout: 1
|
||||
state: stopped
|
||||
when:
|
||||
- enable_mariadb | bool
|
||||
- "{{ 'mariadb' not in haproxy_stat }}"
|
||||
- inventory_hostname in groups['haproxy']
|
||||
|
||||
- name: Checking free port for Mistral API HAProxy
|
||||
wait_for:
|
||||
host: "{{ kolla_internal_vip_address }}"
|
||||
@ -280,6 +291,28 @@
|
||||
- nova_console == 'spice'
|
||||
- inventory_hostname in groups['haproxy']
|
||||
|
||||
- name: Checking free port for Octavia API HAProxy
|
||||
wait_for:
|
||||
host: "{{ kolla_internal_vip_address }}"
|
||||
port: "{{ octavia_api_port }}"
|
||||
connect_timeout: 1
|
||||
state: stopped
|
||||
when:
|
||||
- enable_octavia | bool
|
||||
- "{{ 'octavia_api' not in haproxy_stat }}"
|
||||
- inventory_hostname in groups['haproxy']
|
||||
|
||||
- name: Checking free port for Panko API HAProxy
|
||||
wait_for:
|
||||
host: "{{ kolla_internal_vip_address }}"
|
||||
port: "{{ panko_api_port }}"
|
||||
connect_timeout: 1
|
||||
state: stopped
|
||||
when:
|
||||
- enable_panko | bool
|
||||
- "{{ 'panko_api' not in haproxy_stat }}"
|
||||
- inventory_hostname in groups['haproxy']
|
||||
|
||||
- name: Checking free port for RabbitMQ Management HAProxy
|
||||
wait_for:
|
||||
host: "{{ kolla_internal_vip_address }}"
|
||||
@ -291,6 +324,17 @@
|
||||
- "{{ 'rabbitmq_management' not in haproxy_stat }}"
|
||||
- inventory_hostname in groups['haproxy']
|
||||
|
||||
- name: Checking free port for RadosGW HAProxy
|
||||
wait_for:
|
||||
host: "{{ kolla_internal_vip_address }}"
|
||||
port: "{{ rgw_port }}"
|
||||
connect_timeout: 1
|
||||
state: stopped
|
||||
when:
|
||||
- enable_ceph_rgw | bool
|
||||
- "{{ 'radosgw' not in haproxy_stat }}"
|
||||
- inventory_hostname in groups['haproxy']
|
||||
|
||||
- name: Checking free port for Sahara API HAProxy
|
||||
wait_for:
|
||||
host: "{{ kolla_internal_vip_address }}"
|
||||
|
@ -1 +1,42 @@
|
||||
---
|
||||
- name: Get container facts
|
||||
kolla_container_facts:
|
||||
name:
|
||||
- mariadb
|
||||
register: container_facts
|
||||
|
||||
- name: Checking free port for MariaDB
|
||||
wait_for:
|
||||
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
|
||||
port: "{{ database_port }}"
|
||||
connect_timeout: 1
|
||||
state: stopped
|
||||
when:
|
||||
- container_facts['mariadb'] is not defined
|
||||
|
||||
- name: Checking free port for MariaDB WSREP
|
||||
wait_for:
|
||||
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
|
||||
port: "{{ mariadb_wsrep_port }}"
|
||||
connect_timeout: 1
|
||||
state: stopped
|
||||
when:
|
||||
- container_facts['mariadb'] is not defined
|
||||
|
||||
- name: Checking free port for MariaDB IST
|
||||
wait_for:
|
||||
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
|
||||
port: "{{ mariadb_ist_port }}"
|
||||
connect_timeout: 1
|
||||
state: stopped
|
||||
when:
|
||||
- container_facts['mariadb'] is not defined
|
||||
|
||||
- name: Checking free port for MariaDB SST
|
||||
wait_for:
|
||||
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
|
||||
port: "{{ mariadb_sst_port }}"
|
||||
connect_timeout: 1
|
||||
state: stopped
|
||||
when:
|
||||
- container_facts['mariadb'] is not defined
|
||||
|
@ -1 +1,27 @@
|
||||
---
|
||||
- name: Get container facts
|
||||
kolla_container_facts:
|
||||
name:
|
||||
- octavia_api
|
||||
- octavia_health_manager
|
||||
register: container_facts
|
||||
|
||||
- name: Checking free port for Octavia API
|
||||
wait_for:
|
||||
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
|
||||
port: "{{ octavia_api_port }}"
|
||||
connect_timeout: 1
|
||||
state: stopped
|
||||
when:
|
||||
- container_facts['octavia_api'] is not defined
|
||||
- inventory_hostname in groups['octavia-api']
|
||||
|
||||
- name: Checking free port for Octavia Health Manager
|
||||
wait_for:
|
||||
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
|
||||
port: "{{ octavia_health_manager_port }}"
|
||||
connect_timeout: 1
|
||||
state: stopped
|
||||
when:
|
||||
- container_facts['octavia_health_manager'] is not defined
|
||||
- inventory_hostname in groups['octavia-health-manager']
|
||||
|
16
ansible/roles/panko/tasks/precheck.yml
Normal file
16
ansible/roles/panko/tasks/precheck.yml
Normal file
@ -0,0 +1,16 @@
|
||||
---
|
||||
- name: Get container facts
|
||||
kolla_container_facts:
|
||||
name:
|
||||
- panko_api
|
||||
register: container_facts
|
||||
|
||||
- name: Checking free port for Panko API
|
||||
wait_for:
|
||||
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
|
||||
port: "{{ panko_api_port }}"
|
||||
connect_timeout: 1
|
||||
state: stopped
|
||||
when:
|
||||
- container_facts['panko_api'] is not defined
|
||||
- inventory_hostname in groups['panko-api']
|
@ -123,56 +123,6 @@
|
||||
- enable_iscsid | bool
|
||||
- inventory_hostname in groups['tgtd']
|
||||
|
||||
- name: Checking free port for MariaDB
|
||||
wait_for:
|
||||
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
|
||||
port: "{{ database_port }}"
|
||||
connect_timeout: 1
|
||||
state: stopped
|
||||
when:
|
||||
- enable_mariadb | bool
|
||||
- inventory_hostname in groups['mariadb']
|
||||
|
||||
- name: Checking free port for MariaDB HAProxy
|
||||
wait_for:
|
||||
host: "{{ kolla_internal_vip_address }}"
|
||||
port: "{{ database_port }}"
|
||||
connect_timeout: 1
|
||||
state: stopped
|
||||
when:
|
||||
- enable_mariadb | bool
|
||||
- inventory_hostname in groups['haproxy']
|
||||
|
||||
- name: Checking free port for MariaDB WSREP
|
||||
wait_for:
|
||||
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
|
||||
port: "{{ mariadb_wsrep_port }}"
|
||||
connect_timeout: 1
|
||||
state: stopped
|
||||
when:
|
||||
- enable_mariadb | bool
|
||||
- inventory_hostname in groups['mariadb']
|
||||
|
||||
- name: Checking free port for MariaDB IST
|
||||
wait_for:
|
||||
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
|
||||
port: "{{ mariadb_ist_port }}"
|
||||
connect_timeout: 1
|
||||
state: stopped
|
||||
when:
|
||||
- enable_mariadb | bool
|
||||
- inventory_hostname in groups['mariadb']
|
||||
|
||||
- name: Checking free port for MariaDB SST
|
||||
wait_for:
|
||||
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
|
||||
port: "{{ mariadb_sst_port }}"
|
||||
connect_timeout: 1
|
||||
state: stopped
|
||||
when:
|
||||
- enable_mariadb | bool
|
||||
- inventory_hostname in groups['mariadb']
|
||||
|
||||
- name: Checking free port for Mongodb
|
||||
wait_for:
|
||||
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
|
||||
@ -312,23 +262,3 @@
|
||||
when:
|
||||
- enable_swift | bool
|
||||
- inventory_hostname in groups['haproxy']
|
||||
|
||||
- name: Checking free port for RadosGW
|
||||
wait_for:
|
||||
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
|
||||
port: "{{ rgw_port }}"
|
||||
connect_timeout: 1
|
||||
state: stopped
|
||||
when:
|
||||
- enable_ceph_rgw | bool
|
||||
- inventory_hostname in groups['ceph-rgw']
|
||||
|
||||
- name: Checking free port for RadosGW HAProxy
|
||||
wait_for:
|
||||
host: "{{ kolla_internal_vip_address }}"
|
||||
port: "{{ rgw_port }}"
|
||||
connect_timeout: 1
|
||||
state: stopped
|
||||
when:
|
||||
- enable_ceph_rgw | bool
|
||||
- inventory_hostname in groups['haproxy']
|
||||
|
Loading…
Reference in New Issue
Block a user