We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3b7306d commit cf6761dCopy full SHA for cf6761d
roles/test_snmp_traps/tasks/main.yml
@@ -69,11 +69,18 @@
69
- name: "RHELOSP-144481 Check for snmpTraps logs"
70
ansible.builtin.shell:
71
cmd: |
72
- oc logs -l "app=default-snmp-webhook" | grep "Sending SNMP trap"
+ oc logs -l "app=default-snmp-webhook" | grep "Sending SNMP trap"
73
register: cmd_output
74
changed_when: false
75
failed_when: "cmd_output.stdout_lines | length == 0"
76
77
+ rescue:
78
+ - name: "Get the snmp traps logs"
79
+ ansible.builtin.shell:
80
+ cmd: |
81
+ oc logs -l "app=default-snmp-webhook"
82
+ changed_when: false
83
+
84
always:
85
- name: "Delete the PrometheusRule"
86
ansible.builtin.command:
0 commit comments