ansible/test/integration/targets/lookups/template_deepcopy/playbook.yml
Martin Krizek cd8ce16d48
template lookup: fix regression when templating hostvars (#64070)
This fixes a regression that was caused by switching from copy() to
deepcopy() when 'saving' variables before templating. Since HostVars
did not implement the __deepcopy__() method, deepcopy returned incorrect
results when host vars were present in the variables.

Fixes #63940
2019-11-06 15:25:43 +01:00

10 lines
245 B
YAML

- hosts: h1
gather_facts: no
tasks:
- set_fact:
templated_foo: "{{ lookup('template', 'template.in') }}"
- name: Test that the hostvar was templated correctly
assert:
that:
- templated_foo == "foo\n"