summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/template/templates
diff options
context:
space:
mode:
authorMartin Krizek <martin.krizek@gmail.com>2020-04-14 10:27:02 +0200
committerGitHub <noreply@github.com>2020-04-14 10:27:02 +0200
commitff1ba39c8af0bb1e28932823814bbdd5aa45cd37 (patch)
tree88daff8a3366a0b4a3fa221f54be61942a6e710e /test/integration/targets/template/templates
parentSwitch network incidental tests to VyOS 1.1.7-R2. (diff)
downloadansible-ff1ba39c8af0bb1e28932823814bbdd5aa45cd37.tar.xz
ansible-ff1ba39c8af0bb1e28932823814bbdd5aa45cd37.zip
Prevent templating unused variables for {%include%} (#68749)
Fixes #68699
Diffstat (limited to 'test/integration/targets/template/templates')
-rw-r--r--test/integration/targets/template/templates/unused_vars_include.j21
-rw-r--r--test/integration/targets/template/templates/unused_vars_template.j22
2 files changed, 3 insertions, 0 deletions
diff --git a/test/integration/targets/template/templates/unused_vars_include.j2 b/test/integration/targets/template/templates/unused_vars_include.j2
new file mode 100644
index 0000000000..457cbbc0e1
--- /dev/null
+++ b/test/integration/targets/template/templates/unused_vars_include.j2
@@ -0,0 +1 @@
+{{ var_set_in_template }}
diff --git a/test/integration/targets/template/templates/unused_vars_template.j2 b/test/integration/targets/template/templates/unused_vars_template.j2
new file mode 100644
index 0000000000..28afc90214
--- /dev/null
+++ b/test/integration/targets/template/templates/unused_vars_template.j2
@@ -0,0 +1,2 @@
+{% set var_set_in_template=test_var %}
+{% include "unused_vars_include.j2" %}