summaryrefslogtreecommitdiff
path: root/test/integration/targets/incidental_inventory_aws_ec2/playbooks/test_inventory_cache.yml
blob: d83cb0bfe6989a2df08b37b49b2de60c8c9faaf9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
---
- hosts: 127.0.0.1
  connection: local
  gather_facts: no
  tasks:
    - name: assert cache was used to populate inventory
      assert:
        that:
          - "'aws_ec2' in groups"
          - "groups.aws_ec2 | length == 1"

    - meta: refresh_inventory

    - name: assert refresh_inventory updated the cache
      assert:
        that:
          - "'aws_ec2' in groups"
          - "not groups.aws_ec2"