kolla-ansible/ansible/roles/solum/tasks/precheck.yml
caoyuan 2718005b8b Add prechecks into solum roles
Change-Id: I7de471a5a513b7e6b4a0e697fa64f64fa0d519b2
Partially-implements: blueprint condition-pre-check
2017-01-18 10:05:29 +08:00

27 lines
829 B
YAML

---
- name: Get container facts
kolla_container_facts:
name:
- solum_api
register: container_facts
- name: Checking free port for Solum Application Deployment
wait_for:
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
port: "{{ solum_application_deployment_port }}"
connect_timeout: 1
state: stopped
when:
- container_facts['solum_api'] is not defined
- inventory_hostname in groups['solum-api']
- name: Checking free port for Solum Image Builder
wait_for:
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
port: "{{ solum_image_builder_port }}"
connect_timeout: 1
state: stopped
when:
- container_facts['solum_api'] is not defined
- inventory_hostname in groups['solum-api']