Debian Codegraph @

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

raw
1 - name: Test ANSIBLE_DUPLICATE_YAML_DICT_KEY=warn
2 command: ansible-playbook {{ verbosity }} {{ role_path }}/playbook.yml
3 environment:
4 ANSIBLE_DUPLICATE_YAML_DICT_KEY: warn
5 register: duplicate_warn
6
7 - assert:
8 that:
9 - duplicate_warn.stderr is contains("Found duplicate mapping key 'foo'")
10 - duplicate_warn.rc == 0
11
12 - name: Test ANSIBLE_DUPLICATE_YAML_DICT_KEY=error
13 command: ansible-playbook {{ verbosity }} {{ role_path }}/playbook.yml
14 failed_when: duplicate_error.rc != 4
15 environment:
16 ANSIBLE_DUPLICATE_YAML_DICT_KEY: error
17 register: duplicate_error
18
19 - assert:
20 that:
21 - duplicate_error.stderr is contains("Found duplicate mapping key 'foo'")
22 - duplicate_error.rc == 4
23
24 - name: Test ANSIBLE_DUPLICATE_YAML_DICT_KEY=ignore
25 command: ansible-playbook {{ verbosity }} {{ role_path }}/playbook.yml
26 environment:
27 ANSIBLE_DUPLICATE_YAML_DICT_KEY: ignore
28 register: duplicate_ignore
29
30 - assert:
31 that:
32 - duplicate_ignore.stderr is not contains("Found duplicate mapping key 'foo'")
33 - duplicate_ignore.rc == 0
34
35
36 - name: test unsafe YAMLism
37 import_tasks: unsafe.yml