Debian Codegraph @

test/integration/targets/collections/test_bypass_host_loop.yml

raw
1 - name: Test collection lookup bypass host list
2 hosts: all
3 connection: local
4 gather_facts: false
5 collections:
6 - testns.testcoll
7 tasks:
8 - bypass_host_loop:
9 register: bypass
10
11 - run_once: true
12 vars:
13 bypass_hosts: '{{ hostvars|dictsort|map(attribute="1.bypass.bypass_inventory_hostname")|select("defined")|unique }}'
14 block:
15 - debug:
16 var: bypass_hosts
17
18 - assert:
19 that: bypass_hosts|length == 1