Debian Codegraph @

test/integration/targets/config/match_option_methods.yml

raw
1 - hosts: localhost
2 gather_facts: false
3 vars:
4 direct: "{{ query('broken', some_option='foo') }}"
5 default: "{{ query('broken') }}"
6 tasks:
7 - name: Set directly but also have vars
8 set_fact:
9 direct_with_vars: "{{ query('broken', some_option='foo') }}"
10 vars:
11 playground_test_1: var 1
12 playground_test_2: var 2
13 - name: Set via vars only
14 set_fact:
15 vars_only: "{{ query('broken') }}"
16 vars:
17 playground_test_1: var 1
18 playground_test_2: var 2
19
20 - debug: msg={{q('vars', item)}}
21 loop:
22 - direct
23 - default
24 - direct_with_vars
25 - vars_only
26
27 - name: now ensure it all worked as expected (simple value, origin value, origin)
28 assert:
29 that:
30 - direct[0] == direct[1]
31 - direct[2] == 'Direct'
32 - default[0] == default[1]
33 - default[2] == 'default'
34 - direct_with_vars[0] == direct_with_vars[1]
35 - direct_with_vars[2] == 'Direct'
36 - vars_only[0] == vars_only[1]
37 - vars_only[2].startswith('var:')