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.
ansible/test/integration/targets/lookup_inventory_hostnames/main.yml

14 lines
254 B
YAML

---
- hosts: localhost
gather_facts: no
tasks:
- set_fact:
hosts_a: "{{ lookup('inventory_hostnames', 'group01', wantlist=true) }}"
- set_fact:
hosts_b: "{{ groups['group01'] }}"
- assert:
that:
- hosts_a == hosts_b