Move mistral precheck into its own role

Co-Authored-By: caoyuan <cao.yuan@99cloud.net>
Change-Id: Ibc1b5134173f9cdfbfe8a059e5354497fa5dae4e
Partially-implements: blueprint condition-pre-check
This commit is contained in:
Eduardo Gonzalez 2016-12-28 18:15:53 +01:00 committed by caoyuan
parent 35c8029b05
commit e85025eccb
3 changed files with 26 additions and 20 deletions

View File

@ -168,6 +168,17 @@
- "{{ 'manila_api' not in haproxy_stat }}"
- inventory_hostname in groups['haproxy']
- name: Checking free port for Mistral API HAProxy
wait_for:
host: "{{ kolla_internal_vip_address }}"
port: "{{ mistral_api_port }}"
connect_timeout: 1
state: stopped
when:
- enable_mistral | bool
- "{{ 'mistral_api' not in haproxy_stat }}"
- inventory_hostname in groups['haproxy']
- name: Checking free port for Neutron Server HAProxy
wait_for:
host: "{{ kolla_internal_vip_address }}"

View File

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

View File

@ -580,26 +580,6 @@
- enable_grafana | bool
- inventory_hostname in groups['haproxy']
- name: Checking free port for Mistral API
wait_for:
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
port: "{{ mistral_api_port }}"
connect_timeout: 1
state: stopped
when:
- enable_mistral | bool
- inventory_hostname in groups['mistral-api']
- name: Checking free port for Mistral API HAProxy
wait_for:
host: "{{ kolla_internal_vip_address }}"
port: "{{ mistral_api_port }}"
connect_timeout: 1
state: stopped
when:
- enable_mistral | bool
- inventory_hostname in groups['haproxy']
- name: Checking free port for Searchlight API
wait_for:
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"