use conditionals in list form
This commit is contained in:
parent
ffb58cd557
commit
81f075340b
|
@ -75,9 +75,10 @@
|
|||
- legacy.deprecations | default([]) | length > 0
|
||||
fail_msg: legacy={{legacy}}
|
||||
# only check for a dep warning if legacy returned /usr/bin/python and auto didn't
|
||||
when: legacy.ansible_facts.discovered_interpreter_python == '/usr/bin/python' and
|
||||
auto_out.ansible_facts.discovered_interpreter_python != '/usr/bin/python' and
|
||||
ansible_version.full is version_compare('2.12.0', '<', strict=True)
|
||||
when:
|
||||
- legacy.ansible_facts.discovered_interpreter_python == '/usr/bin/python'
|
||||
- auto_out.ansible_facts.discovered_interpreter_python != '/usr/bin/python'
|
||||
- ansible_version.full is version_compare('2.12.0', '<', strict=True)
|
||||
|
||||
- name: check for warning (only on platforms where auto result is not /usr/bin/python and legacy is) from ansible 2.12 on
|
||||
assert:
|
||||
|
@ -85,9 +86,10 @@
|
|||
- legacy.warnings | default([]) | length > 0
|
||||
fail_msg: legacy={{legacy}}
|
||||
# only check for a warning if legacy returned /usr/bin/python and auto didn't
|
||||
when: legacy.ansible_facts.discovered_interpreter_python == '/usr/bin/python' and
|
||||
auto_out.ansible_facts.discovered_interpreter_python != '/usr/bin/python' and
|
||||
ansible_version.full is version_compare('2.12.0', '>=', strict=True)
|
||||
when:
|
||||
- legacy.ansible_facts.discovered_interpreter_python == '/usr/bin/python'
|
||||
- auto_out.ansible_facts.discovered_interpreter_python != '/usr/bin/python'
|
||||
- ansible_version.full is version_compare('2.12.0', '>=', strict=True)
|
||||
|
||||
- name: test that auto_silent never warns and got the same answer as auto
|
||||
block:
|
||||
|
|
Loading…
Reference in New Issue