Debian Codegraph @

test/integration/targets/yaml_parsing/tasks/unsafe.yml

raw
1 - name: ensure no templating unsafe
2 block:
3 - name: check unsafe string
4 assert:
5 that:
6 - regstr != resolved
7 - "'Fail' not in regstr"
8 - "'{' in regstr"
9 - "'}' in regstr"
10 vars:
11 regstr: !unsafe b{{nottemplate}}
12
13 - name: check unsafe string in list
14 assert:
15 that:
16 - ulist[0] != resolved
17 - "'Fail' not in ulist[0]"
18 - "'{' in ulist[0]"
19 - "'}' in ulist[0]"
20 vars:
21 ulist: !unsafe [ 'b{{nottemplate}}', 'c', 'd']
22
23 - name: check unsafe string in dict
24 assert:
25 that:
26 - udict['a'] != resolved
27 - "'Fail' not in udict['a']"
28 - "'{' in udict['a']"
29 - "'}' in udict['a']"
30 vars:
31 udict: !unsafe
32 a: b{{nottemplate}}
33 c: d
34 vars:
35 nottemplate: FAIL
36 resolved: 'b{{nottemplate}}'