mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
corrected changed_when handling
This commit is contained in:
parent
7f233c4c5e
commit
9318727021
1 changed files with 1 additions and 3 deletions
|
@ -452,12 +452,10 @@ class TaskExecutor:
|
|||
|
||||
# helper methods for use below in evaluating changed/failed_when
|
||||
def _evaluate_changed_when_result(result):
|
||||
if self._task.changed_when:
|
||||
if self._task.changed_when is not None and self._task.changed_when:
|
||||
cond = Conditional(loader=self._loader)
|
||||
cond.when = self._task.changed_when
|
||||
result['changed'] = cond.evaluate_conditional(templar, vars_copy)
|
||||
else:
|
||||
result['changed'] = False
|
||||
|
||||
def _evaluate_failed_when_result(result):
|
||||
if self._task.failed_when:
|
||||
|
|
Loading…
Reference in a new issue