Merge "Move sahara precheck into its own role"

This commit is contained in:
Jenkins 2017-01-03 05:53:20 +00:00 committed by Gerrit Code Review
commit 6ae9b1651e
3 changed files with 26 additions and 20 deletions

View File

@ -112,3 +112,14 @@
- enable_manila | bool - enable_manila | bool
- "{{ 'manila_api' not in haproxy_stat }}" - "{{ 'manila_api' not in haproxy_stat }}"
- inventory_hostname in groups['haproxy'] - inventory_hostname in groups['haproxy']
- name: Checking free port for Sahara API HAProxy
wait_for:
host: "{{ kolla_internal_vip_address }}"
port: "{{ sahara_api_port }}"
connect_timeout: 1
state: stopped
when:
- enable_sahara | bool
- "{{ 'sahara_api' not in haproxy_stat }}"
- inventory_hostname in groups['haproxy']

View File

@ -163,26 +163,6 @@
- enable_kuryr | bool - enable_kuryr | bool
- inventory_hostname in groups['compute'] - inventory_hostname in groups['compute']
- name: Checking free port for Sahara API
wait_for:
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
port: "{{ sahara_api_port }}"
connect_timeout: 1
state: stopped
when:
- enable_sahara | bool
- inventory_hostname in groups['sahara-api']
- name: Checking free port for Sahara API HAProxy
wait_for:
host: "{{ kolla_internal_vip_address }}"
port: "{{ sahara_api_port }}"
connect_timeout: 1
state: stopped
when:
- enable_sahara | bool
- inventory_hostname in groups['haproxy']
- name: Checking free port for HAProxy stats - name: Checking free port for HAProxy stats
wait_for: wait_for:
host: "{{ kolla_internal_vip_address }}" host: "{{ kolla_internal_vip_address }}"

View File

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