kolla-ansible/ansible/roles/monasca/tasks/precheck.yml
Michal Nasiadka dcf5a8b65f Fix var-spacing
ansible-lint introduced var-spacing - let's fix our code.

Change-Id: I0d8aaf3c522a5a6a5495032f6dbed8a2be0251f0
2022-07-25 22:15:15 +02:00

46 lines
1.4 KiB
YAML

---
- import_role:
name: service-precheck
vars:
service_precheck_services: "{{ monasca_services }}"
service_name: "{{ project_name }}"
- name: Get container facts
become: true
kolla_container_facts:
name: "{{ monasca_services.values() | map(attribute='container_name') | list }}"
register: container_facts
- name: Checking free port for monasca-api
wait_for:
host: "{{ api_interface_address }}"
port: "{{ monasca_api_port }}"
connect_timeout: 1
timeout: 1
state: stopped
when:
- inventory_hostname in groups[monasca_services['monasca-api']['group']]
- container_facts['monasca_api'] is not defined
- name: Checking free port for monasca-agent-forwarder
wait_for:
host: "{{ api_interface_address }}"
port: "{{ monasca_agent_forwarder_port }}"
connect_timeout: 1
timeout: 1
state: stopped
when:
- inventory_hostname in groups[monasca_services['monasca-agent-forwarder']['group']]
- container_facts['monasca_agent_forwarder'] is not defined
- name: Checking free port for monasca-agent-statsd
wait_for:
host: "{{ api_interface_address }}"
port: "{{ monasca_agent_statsd_port }}"
connect_timeout: 1
timeout: 1
state: stopped
when:
- inventory_hostname in groups[monasca_services['monasca-agent-statsd']['group']]
- container_facts['monasca_agent_statsd'] is not defined