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/collections/test_bypass_host_loop.yml

20 lines
477 B
YAML

- name: Test collection lookup bypass host list
hosts: all
connection: local
gather_facts: false
collections:
- testns.testcoll
tasks:
- bypass_host_loop:
register: bypass
- run_once: true
vars:
bypass_hosts: '{{ hostvars|dictsort|map(attribute="1.bypass.bypass_inventory_hostname")|select("defined")|unique }}'
block:
- debug:
var: bypass_hosts
- assert:
that: bypass_hosts|length == 1