Debian Codegraph @

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

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