Debian Codegraph @

ansible_collections/community/grafana/tests/integration/targets/grafana_dashboard/tasks/delete-dashboard.yml

raw symbols SCIP
1 ---
2 - name: Delete dashboard | check mode | dashboard exists
3 community.grafana.grafana_dashboard:
4 state: absent
5 uid: "{{ uid_to_delete }}"
6 check_mode: true
7 register: dd_result1
8 - ansible.builtin.assert:
9 that:
10 - dd_result1.failed == false
11 - dd_result1.changed == true
12 - dd_result1.msg == 'Dashboard ' ~ dd_result1.uid ~ ' will be deleted'
13
14 - name: Delete dashboard | run mode | dashboard exists
15 community.grafana.grafana_dashboard:
16 state: absent
17 uid: "{{ uid_to_delete }}"
18 check_mode: false
19 register: dd_result2
20 - ansible.builtin.assert:
21 that:
22 - dd_result2.failed == false
23 - dd_result2.changed == true
24 - dd_result2.msg == 'Dashboard ' ~ dd_result2.uid ~ ' deleted'
25
26 - name: Delete dashboard | check mode | dashboard does not exist
27 community.grafana.grafana_dashboard:
28 state: absent
29 uid: "{{ uid_to_delete }}"
30 check_mode: true
31 register: dd_result1
32 - ansible.builtin.assert:
33 that:
34 - dd_result1.failed == false
35 - dd_result1.changed == false
36 - dd_result1.msg == 'Dashboard ' ~ dd_result1.uid ~ ' does not exist.'
37
38 - name: Delete dashboard | run mode | dashboard does not exist
39 community.grafana.grafana_dashboard:
40 state: absent
41 uid: "{{ uid_to_delete }}"
42 check_mode: false
43 register: dd_result2
44 - ansible.builtin.assert:
45 that:
46 - dd_result2.failed == false
47 - dd_result2.changed == false
48 - dd_result2.msg == 'Dashboard ' ~ dd_result2.uid ~ ' does not exist.'