mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42:50 +00:00
Work in progress on merging changed_when.
This commit is contained in:
@@ -528,7 +528,8 @@ class Runner(object):
|
||||
self.conditional = [ self.conditional ]
|
||||
|
||||
for cond in self.conditional:
|
||||
if not utils.check_conditional(cond, self.basedir, inject):
|
||||
|
||||
if not utils.check_conditional(cond, self.basedir, inject, fail_on_undefined=self.error_on_undefined_vars):
|
||||
result = utils.jsonify(dict(changed=False, skipped=True))
|
||||
self.callbacks.on_skipped(host, inject.get('item',None))
|
||||
return ReturnData(host=host, result=result)
|
||||
@@ -636,8 +637,7 @@ class Runner(object):
|
||||
if 'stdout' in data:
|
||||
data['stdout_lines'] = data['stdout'].splitlines()
|
||||
inject[register] = data
|
||||
changed = template.template(self.basedir, changed_when, inject, fail_on_undefined=self.error_on_undefined_vars)
|
||||
data['changed'] = utils.check_conditional(changed)
|
||||
data['changed'] = utils.check_conditional(changed_when, self.basedir, inject, fail_on_undefined=self.error_on_undefined_vars)
|
||||
|
||||
if is_chained:
|
||||
# no callbacks
|
||||
|
||||
Reference in New Issue
Block a user