I'm in a situation where I have a role that relies on
ANSIBLE_JINJA2_NATIVE=True.
However, setting this option in my ansible.cfg is causing breakage in
many older playbooks.
Is there a way to configure this behavior more granularly, for
instance at role/play level?
Thanks, this works.
However, the playbook also "works" without setting this, in the sense
that various template related task will yield unexpected results,
messing things up down the line.
My approach was then to start my playbook with something like this:
This at least avoids running the playbook without this environment var set.
But then it also doesn't work if you have the "regular" option
switched on ("jinja2_native = True" in ~/.ansible.cfg, for instance).
I accept that there is no way to set configuration options at play
level, but is there be a way to check for them?
Then I can at least make an informed decision about continuing or not.
The root cause seems to be a lot of historic cruft that expects
everything returned form jinja2 to be strings, which is not easy to
fix...