Move murano precheck into its own role

Change-Id: I3a2b6869a7742c5bf91c3dc20523784aca0eb521
Partially-implements: blueprint condition-pre-check
This commit is contained in:
caoyuan 2016-12-27 14:42:07 +08:00
parent adaabb9c4d
commit eeac3134b3
3 changed files with 26 additions and 20 deletions

View File

@ -212,6 +212,17 @@
- "{{ 'mistral_api' not in haproxy_stat }}"
- inventory_hostname in groups['haproxy']
- name: Checking free port for Murano API HAProxy
wait_for:
host: "{{ kolla_internal_vip_address }}"
port: "{{ murano_api_port }}"
connect_timeout: 1
state: stopped
when:
- enable_murano | bool
- "{{ 'murano_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:
- murano_api
register: container_facts
- name: Checking free port for Murano API
wait_for:
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
port: "{{ murano_api_port }}"
connect_timeout: 1
state: stopped
when:
- container_facts['murano_api'] is not defined
- inventory_hostname in groups['murano-api']

View File

@ -193,26 +193,6 @@
- enable_mariadb | bool
- inventory_hostname in groups['mariadb']
- name: Checking free port for Murano API
wait_for:
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
port: "{{ murano_api_port }}"
connect_timeout: 1
state: stopped
when:
- enable_murano | bool
- inventory_hostname in groups['murano-api']
- name: Checking free port for Murano API HAProxy
wait_for:
host: "{{ kolla_internal_vip_address }}"
port: "{{ murano_api_port }}"
connect_timeout: 1
state: stopped
when:
- enable_murano | bool
- inventory_hostname in groups['haproxy']
- name: Checking free port for RabbitMQ
wait_for:
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"