Gareth Healy
2020-02-19 22fc6b3780609316bf50eedfdf20f23a492d861f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
---
- 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