Move kuryr precheck into its own role

Change-Id: I0ae528e614aec65d4fee3044fff7036717a50376
Partially-implements: blueprint condition-pre-check
This commit is contained in:
caoyuan 2017-01-12 00:26:37 +08:00
parent 031a9d462b
commit 901d63f5a5
2 changed files with 15 additions and 10 deletions

View File

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

View File

@ -33,16 +33,6 @@
kolla_internal_vip_address | ipaddr(ip_addr_output.stdout.split()[3]) is none"
when: enable_haproxy | bool
- name: Checking free port for Kuryr
wait_for:
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
port: "{{ kuryr_port }}"
connect_timeout: 1
state: stopped
when:
- enable_kuryr | bool
- inventory_hostname in groups['compute']
- name: Checking free port for HAProxy stats
wait_for:
host: "{{ kolla_internal_vip_address }}"