Fix the Nova SSH port prechecks missing

Change-Id: Ide78ed1de89a9904db48f08fcff3c247ee650317
This commit is contained in:
caoyuan 2017-03-19 16:55:58 +08:00
parent 7ade914531
commit 312c3fe56f

View File

@ -6,6 +6,7 @@
- nova_novncproxy
- nova_serialproxy
- nova_spicehtml5proxy
- nova_ssh
- nova_libvirt
- placement_api
register: container_facts
@ -75,6 +76,19 @@
- nova_spicehtml5proxy.enabled | bool
- inventory_hostname in groups[nova_spicehtml5proxy.group]
- name: Checking free port for Nova SSH
vars:
nova_ssh: "{{ nova_services['nova-ssh'] }}"
wait_for:
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
port: "{{ nova_ssh_port }}"
connect_timeout: 1
state: stopped
when:
- container_facts['nova_ssh'] is not defined
- nova_ssh.enabled | bool
- inventory_hostname in groups[nova_ssh.group]
- name: Checking free port for Nova Placement API
vars:
placement_api: "{{ nova_services['placement-api'] }}"