Template lookup start string breaks environment vars parsing #60106
Labels
affects_2.8
This issue/PR affects Ansible v2.8
bug
This issue/PR relates to a bug.
P3
Priority 3 - Approved, No Time Limitation
support:core
This issue/PR relates to code supported by the Ansible Engineering Team.
verified
This issue has been verified/reproduced by maintainer
SUMMARY
When we create a playbook with environment variables defined from input variables, if one of the tasks in this playbooks use a template lookup plugin with a start/end string different from default, it also changes the start/end string used to parse the environment variable and breaks its parsing.
ISSUE TYPE
COMPONENT NAME
Template Lookup Plugin
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
Distributor ID: Ubuntu
Description: Ubuntu 19.04
Release: 19.04
Codename: disco
STEPS TO REPRODUCE
Create the playbook presented below, also create an empty file called dummy.yaml.j2.
Execute the playbook with
ansible-playbook playbook.yaml -e test_entry=lalala
EXPECTED RESULTS
The expected result was that Debug 1 and 2 output the correct result "lalala" and Debug 3
output output "[% test_entry %]" as it is just a workaround to the bug.
ACTUAL RESULTS
What happened was that debug 1 had the right output, debug 2 had the variable parsing broken by the lookup and debug 3 worked as a workaround to the issue, which should not be necessary.
The text was updated successfully, but these errors were encountered: