Skip to content

Commit

Permalink
[test_verify_email] Add observability_api to the role
Browse files Browse the repository at this point in the history
  • Loading branch information
elfiesmelfie committed Nov 19, 2024
1 parent 00d0d62 commit 9f933df
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion roles/test_verify_email/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
---
# tasks file for roles/test_verify_email

- name: "Get the observability strategy"
ansible.builtin.shell:
cmd: |
oc get stf default -ojsonpath='{.spec.observabilityStrategy}'
register: observability_strategy

- name: "Set the observability api based on the observability strategy"
ansible.builtin.set_fact:
observability_api: "{{ 'monitoring.rhobs' if observability_strategy.stdout == 'use_redhat' else 'monitoring.coreos.com' }}"

- name: "RHELOSP-176042"
# "Create the alert"
ansible.builtin.shell:
cmd: |
oc apply -f - <<EOF
apiVersion: monitoring.coreos.com/v1
apiVersion: {{ observability_api }}/v1
kind: PrometheusRule
metadata:
creationTimestamp: null
Expand Down

0 comments on commit 9f933df

Please sign in to comment.