summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/template/in_template_overrides.yml
blob: 3c2d4d9900e6018076f79138ce96988a2a385d41 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
- hosts: localhost
  gather_facts: false
  vars:
    var_a: "value"
    var_b: "{{ var_a }}"
    var_c: "<< var_a >>"
  tasks:
    - set_fact:
        var_d: "{{ var_a }}"

    - block:
        - template:
            src: in_template_overrides.j2
            dest: out.txt

        - command: cat out.txt
          register: out

        - assert:
            that:
              - "'var_a: value' in out.stdout"
              - "'var_b: value' in out.stdout"
              - "'var_c: << var_a >>' in out.stdout"
              - "'var_d: value' in out.stdout"
      always:
        - file:
            path: out.txt
            state: absent