kolla-ansible/ansible/roles/karbor/tasks/precheck.yml
caowei 4c2da9e6d1 Add karbor ansible role
Co-Authored-By: zhubingbing <zhubingbing10@gmail.com>
Co-Authored-By: zhangshuai <446077695@qq.com>
Co-Authored-By: Mauricio Lima <mauriciolimab@gmail.com>

Change-Id: I7aebe544e3495767d6389dbf220d633a98c137da
Partially-implements: bp karbor-ansible-role
2016-12-21 01:53:20 +08:00

17 lines
449 B
YAML

---
- name: Get container facts
kolla_container_facts:
name:
- karbor_api
register: container_facts
- name: Checking free port for Karbor Admin
wait_for:
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
port: "{{ karbor_api_port }}"
connect_timeout: 1
state: stopped
when:
- inventory_hostname in groups['karbor-api']
- container_facts['karbor-api'] is not defined