summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/gathering/implicit.yml
blob: f1ea965d32dd9fca08327f4d1996684088d1992d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
- hosts: testhost
  tasks:
    - name: check that facts were gathered but no local facts exist
      assert:
        that:
            - ansible_facts is defined and 'fqdn' in ansible_facts
            - not 'uuid' in ansible_local
    - name: create 'local facts' for next gathering
      copy:
        src: uuid.fact
        dest: /etc/ansible/facts.d/
        mode: 0755

- hosts: testhost
  tasks:
    - name: ensure facts are gathered and includes the new 'local facts' created above
      assert:
        that:
            - ansible_facts is defined and 'fqdn' in ansible_facts
            - "'uuid' in ansible_local"

    - name: cleanup 'local facts' from target
      file: path=/etc/ansible/facts.d/uuid.fact state=absent