Debian Codegraph @

ansible_collections/community/grafana/tests/integration/targets/grafana_datasource/tasks/tempo.yml

raw symbols SCIP
1 ---
2 - name: Create tempo datasource
3 register: result
4 community.grafana.grafana_datasource:
5 name: datasource-tempo
6 org_id: "1"
7 ds_type: tempo
8 ds_url: tempo.company.com:3100
9
10 - ansible.builtin.debug:
11 var: result
12
13 - ansible.builtin.assert:
14 that:
15 - result.changed
16 - result.msg == 'Datasource datasource-tempo created'
17
18 - name: Check tempo datasource creation idempotency
19 register: result
20 community.grafana.grafana_datasource:
21 name: datasource-tempo
22 org_id: "1"
23 ds_type: tempo
24 ds_url: tempo.company.com:3100
25
26 - ansible.builtin.debug:
27 var: result
28
29 - ansible.builtin.assert:
30 that:
31 - not result.changed
32 - result.datasource.basicAuth == false
33 - result.datasource.isDefault == false
34 - result.datasource.jsonData.tlsAuth == false
35 - result.datasource.jsonData.tlsAuthWithCACert == false
36 - result.datasource.secureJsonFields.httpHeaderValue1 == true
37 - result.datasource.name == 'datasource-tempo'
38 - result.datasource.orgId == 1
39 - result.datasource.type == 'tempo'
40 - result.datasource.url == 'tempo.company.com:3100'
41 - result.datasource.withCredentials == false
42
43 - name: Delete tempo datasource
44 register: result
45 community.grafana.grafana_datasource:
46 name: datasource-tempo
47 state: absent
48
49 - ansible.builtin.debug:
50 var: result
51
52 - ansible.builtin.assert:
53 that:
54 - result.changed
55
56 - name: Delete tempo datasource
57 register: result
58 community.grafana.grafana_datasource:
59 name: datasource-tempo
60 state: absent
61
62 - ansible.builtin.debug:
63 var: result
64
65 - ansible.builtin.assert:
66 that:
67 - not result.changed