mirror of https://github.com/ansible/ansible.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
414 B
YAML
19 lines
414 B
YAML
5 years ago
|
---
|
||
|
- 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"
|