Merge "Move watcher precheck into its own role"

This commit is contained in:
Jenkins 2016-12-20 08:24:44 +00:00 committed by Gerrit Code Review
commit 715e704ad6
3 changed files with 26 additions and 20 deletions

View File

@ -35,3 +35,14 @@
- enable_glance | bool
- inventory_hostname in groups['haproxy']
- "{{ 'glance_registry' not in haproxy_stat }}"
- name: Checking free port for watcher API HAProxy
wait_for:
host: "{{ kolla_internal_vip_address }}"
port: "{{ watcher_api_port }}"
connect_timeout: 1
state: stopped
when:
- enable_watcher | bool
- "{{ 'watcher_api' not in haproxy_stat }}"
- inventory_hostname in groups['haproxy']

View File

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

View File

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