---
|
- name: Check Prometheus is running
|
command: >
|
oc rollout status StatefulSet/prometheus-prom --watch=true -n "{{ _namespace }}"
|
|
- name: Get Prometheus route host
|
command: >
|
oc get route/prometheus-prom -o jsonpath='{.spec.host}' -n "{{ _namespace }}"
|
register: prom_route
|
retries: "{{ _retry }}"
|
delay: "{{ _delay }}"
|
until: prom_route.stdout != ""
|
|
- name: Wait for Prometheus route to respond with 200
|
uri:
|
url: "https://{{ prom_route.stdout }}"
|
method: GET
|
validate_certs: false
|
follow_redirects: yes
|
register: promresult
|
retries: "{{ _retry }}"
|
delay: "{{ _delay }}"
|
until: promresult.status == 200
|