diff --git a/ansible/roles/nova/tasks/precheck.yml b/ansible/roles/nova/tasks/precheck.yml index 8ef66f68f1..21f4e36176 100644 --- a/ansible/roles/nova/tasks/precheck.yml +++ b/ansible/roles/nova/tasks/precheck.yml @@ -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'] }}"