Debian Codegraph @

ansible_collections/community/grafana/tests/integration/targets/grafana_notification_channel/tasks/slack-and-beyond.yml

raw symbols SCIP
1 ---
2 - name: Create slack notification channel
3 register: result
4 community.grafana.grafana_notification_channel:
5 uid: slack
6 name: slack
7 type: slack
8 slack_url: https://hooks.slack.com/services/xxx/yyy/zzz
9
10 - ansible.builtin.debug:
11 var: result
12
13 - ansible.builtin.assert:
14 that:
15 - result.changed == True
16 - result.channel.name == "slack"
17 - result.channel.type == "slack"
18 - result.channel.uid == "slack"
19
20 - name: Create slack notification channel
21 register: result
22 community.grafana.grafana_notification_channel:
23 uid: slack
24 name: slack
25 type: slack
26 slack_url: https://hooks.slack.com/services/xxx/yyy/zzz
27
28 - ansible.builtin.debug:
29 var: result
30
31 - ansible.builtin.assert:
32 that:
33 - result.changed == False
34 - result.channel.name == "slack"
35 - result.channel.type == "slack"
36 - result.channel.uid == "slack"
37
38 - name: Check slack notification channel idempotency
39 register: result
40 community.grafana.grafana_notification_channel:
41 uid: slack
42 name: slack
43 type: slack
44 slack_url: https://hooks.slack.com/services/xxx/yyy/zzz
45
46 - ansible.builtin.debug:
47 var: result
48
49 - ansible.builtin.assert:
50 that:
51 - result.changed == False
52
53 - name: Update slack notification channel
54 register: result
55 community.grafana.grafana_notification_channel:
56 uid: slack
57 name: slack
58 type: slack
59 slack_url: https://hooks.slack.com/services/xxx/yyy/fff
60
61 - ansible.builtin.debug:
62 var: result
63
64 - ansible.builtin.assert:
65 that:
66 - result.changed == True
67
68 - name: Delete slack notification channel
69 register: result
70 community.grafana.grafana_notification_channel:
71 state: absent
72 uid: slack
73
74 - ansible.builtin.debug:
75 var: result
76
77 - ansible.builtin.assert:
78 that:
79 - result.changed == True
80
81 - name: Delete slack notification channel (idempotency)
82 register: result
83 community.grafana.grafana_notification_channel:
84 state: absent
85 uid: slack
86
87 - ansible.builtin.debug:
88 var: result
89
90 - ansible.builtin.assert:
91 that:
92 - result.changed == False