1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Fix an issue where the ordering of an include statement is processed ahead of the conditional in the included statement,

which required a redundant check to see if a variable was defined rather than short circuiting.

Fixes #4469
This commit is contained in:
Michael DeHaan 2013-10-11 20:43:16 -04:00
parent f51c19aaec
commit d168c709d5

View file

@ -274,6 +274,6 @@ class Task(object):
self.only_if = utils.compile_when_to_only_if(self.when) self.only_if = utils.compile_when_to_only_if(self.when)
if additional_conditions: if additional_conditions:
self.only_if = [ self.only_if ] new_conditions = additional_conditions
self.only_if.extend(additional_conditions) new_conditions.append(self.only_if)
self.only_if = new_conditions