Move some prechecks into its own role

To avoid many merge conflicts and re-works
* Solum
* iscsi
* Keystone
* elasticsearch

Change-Id: Ibaecda35597cf39c602919b4990579f7cfc75c22
Co-Authored-By: caoyuan <cao.yuan@99cloud.net>
Co-Authored-By: qiankun.zhang <zhangqiankun@sgitg.sgcc.com.cn>
Partially-implements: blueprint condition-pre-check
This commit is contained in:
Mauricio Lima 2017-01-16 15:12:43 -03:00
parent b124712c25
commit 90917100f2
4 changed files with 62 additions and 50 deletions

View File

@ -1 +1,16 @@
---
- name: Get container facts
kolla_container_facts:
name:
- elasticsearch
register: container_facts
- name: Checking free port for Elasticsearch
wait_for:
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
port: "{{ elasticsearch_port }}"
connect_timeout: 1
state: stopped
when:
- container_facts['elasticsearch'] is not defined
- inventory_hostname in groups['elasticsearch']

View File

@ -91,6 +91,17 @@
- inventory_hostname in groups['haproxy']
- "{{ 'designate_api' not in haproxy_stat }}"
- name: Checking free port for Elasticsearch HAProxy
wait_for:
host: "{{ kolla_internal_vip_address }}"
port: "{{ elasticsearch_port }}"
connect_timeout: 1
state: stopped
when:
- enable_elasticsearch | bool
- "{{ 'elasticsearch' not in haproxy_stat }}"
- inventory_hostname in groups['haproxy']
- name: Checking free port for Glance API HAProxy
wait_for:
host: "{{ kolla_internal_vip_address }}"
@ -423,6 +434,27 @@
- "{{ 'senlin_api' not in haproxy_stat }}"
- inventory_hostname in groups['haproxy']
- name: Checking free port for Solum Application Deployment HAProxy
wait_for:
host: "{{ kolla_internal_vip_address }}"
port: "{{ solum_application_deployment_port }}"
connect_timeout: 1
state: stopped
when:
- enable_solum | bool
- "{{ 'solum_application_deployment' not in haproxy_stat }}"
- inventory_hostname in groups['haproxy']
- name: Checking free port for Solum Image Builder HAProxy
wait_for:
host: "{{ kolla_internal_vip_address }}"
port: "{{ solum_image_builder_port }}"
connect_timeout: 1
state: stopped
when:
- enable_solum | bool
- "{{ 'solum_image_builder' not in haproxy_stat }}"
- name: Checking free port for Swift Proxy Server HAProxy
wait_for:
host: "{{ kolla_internal_vip_address }}"

View File

@ -1 +1,16 @@
---
- name: Get container facts
kolla_container_facts:
name:
- iscsid
register: container_facts
- name: Checking free port for iscsi
wait_for:
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
port: "{{ iscsi_port }}"
connect_timeout: 1
state: stopped
when:
- container_facts['iscsid'] is not defined
- inventory_hostname in groups['iscsid']

View File

@ -43,16 +43,6 @@
- enable_haproxy | bool
- inventory_hostname in groups['haproxy']
- name: Checking free port for iscsi
wait_for:
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
port: "{{ iscsi_port }}"
connect_timeout: 1
state: stopped
when:
- enable_iscsid | bool
- inventory_hostname in groups['tgtd']
- name: Checking free port for Rsync
wait_for:
host: "{{ hostvars[inventory_hostname]['ansible_' + storage_interface]['ipv4']['address'] }}"
@ -62,43 +52,3 @@
when:
- inventory_hostname in groups['swift-object-server']
- enable_swift | bool
- name: Checking free port for Solum Application Deployment
wait_for:
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
port: "{{ solum_application_deployment_port }}"
connect_timeout: 1
state: stopped
when:
- enable_solum | bool
- inventory_hostname in groups['solum-api']
- name: Checking free port for Solum Image Builder
wait_for:
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
port: "{{ solum_image_builder_port }}"
connect_timeout: 1
state: stopped
when:
- enable_solum | bool
- inventory_hostname in groups['solum-api']
- name: Checking free port for Solum Application Deployment HAProxy
wait_for:
host: "{{ kolla_internal_vip_address }}"
port: "{{ solum_application_deployment_port }}"
connect_timeout: 1
state: stopped
when:
- enable_solum | bool
- inventory_hostname in groups['haproxy']
- name: Checking free port for Solum Image Builder HAProxy
wait_for:
host: "{{ kolla_internal_vip_address }}"
port: "{{ solum_image_builder_port }}"
connect_timeout: 1
state: stopped
when:
- enable_solum | bool
- inventory_hostname in groups['haproxy']