mirror of https://github.com/ansible/ansible.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
1.0 KiB
YAML
34 lines
1.0 KiB
YAML
4 years ago
|
- 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
|