Debian Codegraph @

ansible_collections/community/grafana/tests/integration/targets/grafana_notification_channel/tasks/opsgenie.yml

raw symbols SCIP
1 ---
2 - name: Create opsgenie notification channel
3 register: result
4 community.grafana.grafana_notification_channel:
5 uid: opsgenie
6 name: opsgenie
7 type: opsgenie
8 opsgenie_url: https://example.org
9 opsgenie_api_key: xxx
10
11 - ansible.builtin.debug:
12 var: result
13
14 - ansible.builtin.assert:
15 that:
16 - result.changed == True
17 - result.channel.name == "opsgenie"
18 - result.channel.type == "opsgenie"
19 - result.channel.uid == "opsgenie"
20
21 - name: Create opsgenie notification channel (idempotency)
22 register: result
23 community.grafana.grafana_notification_channel:
24 uid: opsgenie
25 name: opsgenie
26 type: opsgenie
27 opsgenie_url: https://example.org
28 opsgenie_api_key: xxx
29
30 - ansible.builtin.debug:
31 var: result
32
33 - ansible.builtin.assert:
34 that:
35 - result.changed == False
36 - result.channel.name == "opsgenie"
37 - result.channel.type == "opsgenie"
38 - result.channel.uid == "opsgenie"
39
40 - name: Delete opsgenie notification channel
41 register: result
42 community.grafana.grafana_notification_channel:
43 uid: opsgenie
44 state: absent
45
46 - ansible.builtin.debug:
47 var: result
48
49 - ansible.builtin.assert:
50 that:
51 - result.changed == True
52 - result.state == 'absent'
53
54 - name: Delete opsgenie notification channel (idempotency)
55 register: result
56 community.grafana.grafana_notification_channel:
57 uid: opsgenie
58 state: absent
59
60 - ansible.builtin.debug:
61 var: result
62
63 - ansible.builtin.assert:
64 that:
65 - result.changed == False