kolla-ansible/ansible/roles/iscsi/tasks/precheck.yml
Mauricio Lima 90917100f2 Move some prechecks into its own role
To avoid many merge conflicts and re-works
* Solum
* iscsi
* Keystone
* elasticsearch

Change-Id: Ibaecda35597cf39c602919b4990579f7cfc75c22
Co-Authored-By: caoyuan <cao.yuan@99cloud.net>
Co-Authored-By: qiankun.zhang <zhangqiankun@sgitg.sgcc.com.cn>
Partially-implements: blueprint condition-pre-check
2017-01-17 08:54:35 -03:00

17 lines
425 B
YAML

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