Debian Codegraph @

ansible_collections/community/grafana/tests/integration/targets/grafana_contact_point/tasks/webhook.yml

raw symbols SCIP
1 ---
2 - name: Create webhook contact point
3 register: result
4 community.grafana.grafana_contact_point:
5 uid: webhook
6 name: webhook
7 type: webhook
8 webhook_url: https://example.org
9
10 - ansible.builtin.debug:
11 var: result
12
13 - ansible.builtin.assert:
14 that:
15 - result.changed
16 - result.state == "present"
17 - result.contact_point.uid == "webhook"
18 - result.contact_point.name == "webhook"
19 - result.contact_point.type == "webhook"
20
21 - name: Create webhook contact point (idempotency)
22 register: result
23 community.grafana.grafana_contact_point:
24 uid: webhook
25 name: webhook
26 type: webhook
27 webhook_url: https://example.org
28
29 - ansible.builtin.debug:
30 var: result
31
32 - ansible.builtin.assert:
33 that:
34 - not result.changed
35 - result.state == "present"
36 - result.contact_point.uid == "webhook"
37 - result.contact_point.name == "webhook"
38 - result.contact_point.type == "webhook"
39
40 - name: Update webhook contact point
41 register: result
42 community.grafana.grafana_contact_point:
43 uid: webhook
44 name: webhook
45 type: webhook
46 webhook_url: https://example-update.org
47
48 - ansible.builtin.debug:
49 var: result
50
51 - ansible.builtin.assert:
52 that:
53 - result.changed
54 - result.state == "present"
55 - result.contact_point.uid == "webhook"
56 - result.contact_point.name == "webhook"
57 - result.contact_point.type == "webhook"
58 - result.diff is defined
59
60 - name: Delete webhook contact point
61 register: result
62 community.grafana.grafana_contact_point:
63 uid: webhook
64 state: absent
65
66 - ansible.builtin.debug:
67 var: result
68
69 - ansible.builtin.assert:
70 that:
71 - result.changed
72 - result.state == "absent"
73 - result.contact_point.uid == "webhook"
74
75 - name: Delete webhook contact point (idempotency)
76 register: result
77 community.grafana.grafana_contact_point:
78 uid: webhook
79 state: absent
80
81 - ansible.builtin.debug:
82 var: result
83
84 - ansible.builtin.assert:
85 that:
86 - not result.changed
87 - result.state == "absent"