Debian Codegraph @

test/integration/targets/template/template_overrides.yml

raw
1 - hosts: localhost
2 gather_facts: false
3 vars:
4 output_dir: "{{ lookup('env', 'OUTPUT_DIR') }}"
5 var_a: "value"
6 var_b: "{{ var_a }}"
7 var_c: "<< var_a >>"
8 tasks:
9 - set_fact:
10 var_d: "{{ var_a }}"
11
12 - template:
13 src: in_template_overrides.j2
14 dest: '{{ output_dir }}/in_template_overrides.out'
15
16 - template:
17 src: arg_template_overrides.j2
18 dest: '{{ output_dir }}/arg_template_overrides.out'
19 variable_start_string: '<<'
20 variable_end_string: '>>'
21
22 - command: cat '{{ output_dir }}/in_template_overrides.out'
23 register: in_template_overrides_out
24
25 - command: cat '{{ output_dir }}/arg_template_overrides.out'
26 register: arg_template_overrides_out
27
28 - assert:
29 that:
30 - "'var_a: value' in in_template_overrides_out.stdout"
31 - "'var_b: value' in in_template_overrides_out.stdout"
32 - "'var_c: << var_a >>' in in_template_overrides_out.stdout"
33 - "'var_d: value' in in_template_overrides_out.stdout"
34
35 - "'var_a: value' in arg_template_overrides_out.stdout"
36 - "'var_b: value' in arg_template_overrides_out.stdout"
37 - "'var_c: << var_a >>' in arg_template_overrides_out.stdout"
38 - "'var_d: value' in arg_template_overrides_out.stdout"