mirror of https://github.com/ansible/ansible.git
parent
e5a2fe4c41
commit
767b2f07b0
@ -0,0 +1,2 @@
|
||||
bugfixes:
|
||||
- template - ensure Jinja2 overrides from template header are used (https://github.com/ansible/ansible/issues/75275)
|
@ -0,0 +1,5 @@
|
||||
#jinja2:variable_start_string:'<<' , variable_end_string:'>>'
|
||||
var_a: << var_a >>
|
||||
var_b: << var_b >>
|
||||
var_c: << var_c >>
|
||||
var_d: << var_d >>
|
@ -0,0 +1,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
|
Loading…
Reference in New Issue