2020-03-24 20:46:56 +01:00
|
|
|
- name: Ensure clean_facts is working properly
|
|
|
|
hosts: facthost1
|
|
|
|
gather_facts: false
|
|
|
|
tasks:
|
|
|
|
- name: gather 'bad' facts
|
|
|
|
action: bogus_facts
|
|
|
|
|
2021-05-26 15:58:52 +02:00
|
|
|
- name: ensure that the 'bad' facts didn't pollute what they are not supposed to
|
2020-03-24 20:46:56 +01:00
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "'touch' not in discovered_interpreter_python|default('')"
|
|
|
|
- "'touch' not in ansible_facts.get('discovered_interpreter_python', '')"
|
|
|
|
- "'touch' not in ansible_facts.get('ansible_facts', {}).get('discovered_interpreter_python', '')"
|
|
|
|
- bogus_overwrite is undefined
|