<commit_before>---
- name: Get container facts
  kolla_container_facts:
    name:
      - nova_api
      - nova_novncproxy
      - nova_serialproxy
      - nova_spicehtml5proxy
      - nova_libvirt
      - placement_api
  register: container_facts

- name: Checking free port for Nova API
  vars:
    nova_api: "{{ nova_services['nova-api'] }}"
  wait_for:
    host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
    port: "{{ nova_api_port }}"
    connect_timeout: 1
    state: stopped
  when:
    - container_facts['nova_api'] is not defined
    - inventory_hostname in groups[nova_api.group]
    - nova_api.enabled | bool

- name: Checking free port for Nova Metadata
  vars:
    nova_api: "{{ nova_services['nova-api'] }}"
  wait_for:
    host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
    port: "{{ nova_metadata_port }}"
    connect_timeout: 1
    state: stopped
  when:
    - container_facts['nova_api'] is not defined
    - inventory_hostname in groups[nova_api.group]
    - nova_api.enabled | bool

- name: Checking free port for Nova NoVNC Proxy
  vars:
    nova_novncproxy: "{{ nova_services['nova-novncproxy'] }}"
  wait_for:
    host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
    port: "{{ nova_novncproxy_port }}"
    connect_timeout: 1
    state: stopped
  when:
    - container_facts['nova_novncproxy'] is not defined
    - nova_novncproxy.enabled | bool
    - inventory_hostname in groups[nova_novncproxy.group]

- name: Checking free port for Nova Serial Proxy
  vars:
    nova_serialproxy: "{{ nova_services['nova-serialproxy'] }}"
  wait_for:
    host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
    port: "{{ nova_serialproxy_port }}"
    connect_timeout: 1
    state: stopped
  when:
    - container_facts['nova_serialproxy'] is not defined
    - nova_serialproxy.enabled | bool
    - inventory_hostname in groups[nova_serialproxy.group]

- name: Checking free port for Nova Spice HTML5 Proxy
  vars:
    nova_spicehtml5proxy: "{{ nova_services['nova-spicehtml5proxy'] }}"
  wait_for:
    host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
    port: "{{ nova_spicehtml5proxy_port }}"
    connect_timeout: 1
    state: stopped
  when:
    - container_facts['nova_spicehtml5proxy'] is not defined
    - nova_spicehtml5proxy.enabled | bool
    - inventory_hostname in groups[nova_spicehtml5proxy.group]

- name: Checking free port for Nova Placement API
  vars:
    placement_api: "{{ nova_services['placement-api'] }}"
  wait_for:
    host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
    port: "{{ placement_api_port }}"
    connect_timeout: 1
    state: stopped
  when:
    - container_facts['placement_api'] is not defined
    - inventory_hostname in groups[placement_api.group]
    - placement_api.enabled | bool

- name: Checking that libvirt is not running
  vars:
    nova_libvirt: "{{ nova_services['nova-libvirt'] }}"
  stat: path=/var/run/libvirt/libvirt-sock<commit_msg>Fix the Nova SSH port prechecks missing<commit_after>---
- name: Get container facts
  kolla_container_facts:
    name:
      - nova_api
      - nova_novncproxy
      - nova_serialproxy
      - nova_spicehtml5proxy
      - nova_ssh
      - nova_libvirt
      - placement_api
  register: container_facts

- name: Checking free port for Nova API
  vars:
    nova_api: "{{ nova_services['nova-api'] }}"
  wait_for:
    host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
    port: "{{ nova_api_port }}"
    connect_timeout: 1
    state: stopped
  when:
    - container_facts['nova_api'] is not defined
    - inventory_hostname in groups[nova_api.group]
    - nova_api.enabled | bool

- name: Checking free port for Nova Metadata
  vars:
    nova_api: "{{ nova_services['nova-api'] }}"
  wait_for:
    host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
    port: "{{ nova_metadata_port }}"
    connect_timeout: 1
    state: stopped
  when:
    - container_facts['nova_api'] is not defined
    - inventory_hostname in groups[nova_api.group]
    - nova_api.enabled | bool

- name: Checking free port for Nova NoVNC Proxy
  vars:
    nova_novncproxy: "{{ nova_services['nova-novncproxy'] }}"
  wait_for:
    host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
    port: "{{ nova_novncproxy_port }}"
    connect_timeout: 1
    state: stopped
  when:
    - container_facts['nova_novncproxy'] is not defined
    - nova_novncproxy.enabled | bool
    - inventory_hostname in groups[nova_novncproxy.group]

- name: Checking free port for Nova Serial Proxy
  vars:
    nova_serialproxy: "{{ nova_services['nova-serialproxy'] }}"
  wait_for:
    host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
    port: "{{ nova_serialproxy_port }}"
    connect_timeout: 1
    state: stopped
  when:
    - container_facts['nova_serialproxy'] is not defined
    - nova_serialproxy.enabled | bool
    - inventory_hostname in groups[nova_serialproxy.group]

- name: Checking free port for Nova Spice HTML5 Proxy
  vars:
    nova_spicehtml5proxy: "{{ nova_services['nova-spicehtml5proxy'] }}"
  wait_for:
    host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
    port: "{{ nova_spicehtml5proxy_port }}"
    connect_timeout: 1
    state: stopped
  when:
    - container_facts['nova_spicehtml5proxy'] is not defined
    - 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'] }}"
  wait_for:
    host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
    port: "{{ placement_api_port }}"
    connect_timeout: 1
    state: stopped
  when:
    - container_facts['placement_api'] is not defined
    - inventory_hostname in groups[placement_api.group]
    - placement_api.enabled | bool

- name: Checking that libvirt is not running
  vars:
    nova_libvirt: "{{ nova_services['nova-libvirt'] }}"
  stat: path=/var/run/libvirt/libvirt-sock
{'fraction_non_alphanumeric': 0.12729697688203911, 'fraction_numerical': 0.006224066390041493, 'mean_word_length': 3.8835021707670045, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2216549', 'n_tokens_mistral': 2328, 'n_tokens_neox': 2322, 'n_words': 460}