|
|
@ -849,12 +849,15 @@ class Runner(object):
|
|
|
|
|
|
|
|
|
|
|
|
changed_when = self.module_vars.get('changed_when')
|
|
|
|
changed_when = self.module_vars.get('changed_when')
|
|
|
|
failed_when = self.module_vars.get('failed_when')
|
|
|
|
failed_when = self.module_vars.get('failed_when')
|
|
|
|
if changed_when is not None or failed_when is not None:
|
|
|
|
if (changed_when is not None or failed_when is not None) and self.background == 0:
|
|
|
|
register = self.module_vars.get('register')
|
|
|
|
register = self.module_vars.get('register')
|
|
|
|
if register is not None:
|
|
|
|
if register is not None:
|
|
|
|
if 'stdout' in data:
|
|
|
|
if 'stdout' in data:
|
|
|
|
data['stdout_lines'] = data['stdout'].splitlines()
|
|
|
|
data['stdout_lines'] = data['stdout'].splitlines()
|
|
|
|
inject[register] = data
|
|
|
|
inject[register] = data
|
|
|
|
|
|
|
|
# only run the final checks if the async_status has finished,
|
|
|
|
|
|
|
|
# or if we're not running an async_status check at all
|
|
|
|
|
|
|
|
if (module_name == 'async_status' and "finished" in data) or module_name != 'async_status':
|
|
|
|
if changed_when is not None:
|
|
|
|
if changed_when is not None:
|
|
|
|
data['changed'] = utils.check_conditional(changed_when, self.basedir, inject, fail_on_undefined=self.error_on_undefined_vars)
|
|
|
|
data['changed'] = utils.check_conditional(changed_when, self.basedir, inject, fail_on_undefined=self.error_on_undefined_vars)
|
|
|
|
if failed_when is not None:
|
|
|
|
if failed_when is not None:
|
|
|
|