Debian Codegraph @

test/integration/targets/ansible-inventory/tasks/toml_output.yml

raw symbols SCIP
1 - block:
2 # DTFIX3: plug in variable visitor on TOML output and re-enable this test
3 # - name: check baseline
4 # command: ansible-inventory -i '{{ role_path }}/files/valid_sample.yml' --list --toml
5 # register: limited
6 #
7 # - name: ensure non empty host list
8 # assert:
9 # that:
10 # - "'something' in inv['somegroup']['hosts']"
11 #
12 # - name: check that limit removes host
13 # command: ansible-inventory -i '{{ role_path }}/files/valid_sample.yml' --limit '!something' --list --toml
14 # register: limited
15 # ignore_errors: true
16 #
17 # - name: ensure empty host list
18 # assert:
19 # that:
20 # - limited is failed
21
22 - name: check dupes
23 command: ansible-inventory -i '{{ role_path }}/files/complex.ini' --list --toml
24 register: limited
25
26 - debug: var=inv
27
28 - name: ensure host only appears on directly assigned
29 assert:
30 that:
31 - "'hosts' not in inv['parent_1']"
32 - "'hosts' not in inv['parent_2']"
33 - "'hosts' in inv['parent_3']"
34 - "'test1' in inv['test_group1']['hosts']"
35 vars:
36 inv: '{{limited.stdout|from_toml}}'
37 delegate_to: localhost