Merge "Fix the prechecks action for prometheus_server"

This commit is contained in:
Zuul 2018-05-01 06:30:37 +00:00 committed by Gerrit Code Review
commit c93ec09dc7

View File

@ -2,13 +2,13 @@
- name: Get container facts - name: Get container facts
kolla_container_facts: kolla_container_facts:
name: name:
- prometheus - prometheus_server
- prometheus_node_exporter - prometheus_node_exporter
- prometheus_haproxy_exporter - prometheus_haproxy_exporter
- prometheus_mysqld_exporter - prometheus_mysqld_exporter
register: container_facts register: container_facts
- name: Checking free port for Prometheus - name: Checking free port for Prometheus server
wait_for: wait_for:
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}" host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
port: "{{ prometheus_port }}" port: "{{ prometheus_port }}"
@ -16,7 +16,7 @@
timeout: 1 timeout: 1
state: stopped state: stopped
when: when:
- container_facts['prometheus'] is not defined - container_facts['prometheus_server'] is not defined
- inventory_hostname in groups['prometheus'] - inventory_hostname in groups['prometheus']
- name: Checking free port for Prometheus node_exporter - name: Checking free port for Prometheus node_exporter