Skip to content

Commit

Permalink
[test_snmp_traps] Add meaningful changed_when for oc patch
Browse files Browse the repository at this point in the history
  • Loading branch information
elfiesmelfie committed Jan 29, 2025
1 parent ce81e63 commit c730da6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion roles/test_snmp_traps/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
ansible.builtin.shell:
cmd: |
oc patch stf/default --type='json' -p '[{"op": "replace", "path": "/spec/alerting/alertmanager/receivers/snmpTraps/enabled", "value": false }]'
changed_when: false
changed_when: 'cmd_output == "servicetelemetry.infra.watch/default patched"'
register: cmd_output
failed_when: cmd_output.rc != 0

Expand Down

0 comments on commit c730da6

Please sign in to comment.