summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/gathering_facts/test_prevent_injection.yml
blob: 064b7a9019936dbeab3576ab214adcf0c4e2fc6a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
- name: Ensure clean_facts is working properly
  hosts: facthost1
  gather_facts: false
  tasks:
    - name: gather 'bad' facts
      action: bogus_facts

    - name: ensure that the 'bad' facts didn't pollute what they are not supposed to
      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