Merge "Move prechecks into its own role"

This commit is contained in:
Jenkins 2017-01-16 12:04:21 +00:00 committed by Gerrit Code Review
commit 3af19ebab8
6 changed files with 142 additions and 70 deletions

View File

@ -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']

View File

@ -212,6 +212,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 }}"
@ -291,6 +302,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 }}"
@ -302,6 +335,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 }}"

View File

@ -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

View File

@ -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']

View 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']

View File

@ -93,56 +93,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'] }}"
@ -272,23 +222,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']