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