1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/lib/ansible
willthames 377bc31311 Prevent premature substitution of variables into tasks
As documented in #2623, early variable substitution causes when_
tests to fail and possibly other side effects.

I can see the reason for this early substitution, likely introduced
in 1dfe60a6, to allow many playbook parameters to be templated.
This is a valid goal, but the recursive nature of the utils.template
function means that it goes too far.

At this point removing tasks from the list of parameters to be
substituted seems sufficient to make my tests pass. It may be the
case that other parameters should be excluded, but I suspect not.

Adding a test case. I would prefer to analyse not just the aggregate
statistics but also whether the results are as expected - I can't
see an easy way to do that with the available callbacks at present.
2013-04-12 09:17:03 +10:00
..
callback_plugins update some of many copyright dates but we can just do this when editing each file, not super high priority 2013-02-16 15:32:01 -05:00
inventory Style fixes so "make pep8" is clean. 2013-04-10 16:37:49 -04:00
playbook Prevent premature substitution of variables into tasks 2013-04-12 09:17:03 +10:00
runner This is a fix on top of the 'airplane variable upgrade' commits that fixes legacy when_string so it evaluates correctly in the new eval construct. 2013-04-11 17:20:40 -04:00
utils This is a fix on top of the 'airplane variable upgrade' commits that fixes legacy when_string so it evaluates correctly in the new eval construct. 2013-04-11 17:20:40 -04:00
__init__.py Update release version. 2013-04-02 20:48:30 -04:00
callbacks.py implement --start-at-task option to hop to a specific task before starting running them 2013-04-09 01:53:40 -04:00
color.py
constants.py Added DEFAULT_EXECUTABLE as a constant 2013-04-04 13:32:23 +10:00
errors.py
module_common.py This SELinux commit is too strict and we should only fail if trying to read/tweak SELinux attributes else 2013-04-05 14:54:11 -04:00