kolla-ansible/ansible/roles/gnocchi/tasks/precheck.yml
caoyuan 14dcab0cee Move gnocchi precheck into its own role
Change-Id: I6514284ff2f67ec20f37c6953ad5f8fd36a4e90f
Partially-implements: blueprint condition-pre-check
2017-01-03 15:30:50 +08:00

17 lines
452 B
YAML

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