Debian Codegraph @

test/integration/targets/module_no_log/test_no_log.yml

raw
1 - hosts: localhost
2 gather_facts: false
3 tasks:
4 - name: Ensure we do not obscure what we should not
5 block:
6 - module_that_has_secret:
7 secret: something_dangerous
8 notsecret: something_dangerous
9 register: ouch
10 ignore_errors: true
11
12 - name: no log won't obscure booleans when True
13 assert:
14 that:
15 - ouch['changed'] is boolean
16
17 - module_that_has_secret:
18 secret: something_dangerous
19 notsecret: notsecret
20 register: ouch
21 ignore_errors: true
22
23 - name: no log won't obscure booleans when False
24 assert:
25 that:
26 - ouch['changed'] is boolean
27
28 - module_that_has_secret:
29 secret: True
30 notsecret: False
31 register: ouch
32 ignore_errors: true
33
34 - name: no log does not hide bool values
35 assert:
36 that:
37 - ouch['changed'] is boolean
38
39 - name: Ensure exact matches for no log values are masked in module results (non-substring checking)
40 module_that_has_secret:
41 secret: "{{ item }}"
42 notsecret: "{{ item }}"
43 loop:
44 - 1234567
45 - 123456.789
46 - something_dangerous
47
48 - name: Ensure partial value matches for no log values are masked in module results
49 module_that_has_secret:
50 secret: "{{ item.secret }}"
51 notsecret: "{{ item.notsecret }}"
52 loop:
53 - secret: 1234567
54 notsecret: 912345679
55 - secret: 123456.789
56 notsecret: 9123456.7899
57 - secret: something_dangerous
58 notsecret: xsomething_dangerousx