mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00: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:
@@ -274,6 +274,6 @@ class Task(object):
|
||||
self.only_if = utils.compile_when_to_only_if(self.when)
|
||||
|
||||
if additional_conditions:
|
||||
self.only_if = [ self.only_if ]
|
||||
self.only_if.extend(additional_conditions)
|
||||
|
||||
new_conditions = additional_conditions
|
||||
new_conditions.append(self.only_if)
|
||||
self.only_if = new_conditions
|
||||
|
||||
Reference in New Issue
Block a user