|
|
@ -1203,16 +1203,21 @@ class ActionBase(ABC):
|
|
|
|
data['deprecations'].extend(self._discovery_deprecation_warnings)
|
|
|
|
data['deprecations'].extend(self._discovery_deprecation_warnings)
|
|
|
|
|
|
|
|
|
|
|
|
if res['rc'] and data.get('_ansible_parsed') and not data.get('failed'):
|
|
|
|
if res['rc'] and data.get('_ansible_parsed') and not data.get('failed'):
|
|
|
|
data |= {
|
|
|
|
data.setdefault('warnings', []).append(
|
|
|
|
'failed': True,
|
|
|
|
f'The module ({self._task.resolved_action}) exited with a non-zero rc but was not marked as failed. '
|
|
|
|
'module_rc': res['rc'],
|
|
|
|
'This may indicate a module execution failure or other module execution related issue. '
|
|
|
|
'msg': 'The module exited with a non-zero rc but was not marked as failed. This indicates a module execution failure.'
|
|
|
|
'Running with ANSIBLE_DEBUG=1 may provide more information.'
|
|
|
|
}
|
|
|
|
)
|
|
|
|
if 'module_stdout' not in data:
|
|
|
|
# data |= {
|
|
|
|
data |= {
|
|
|
|
# 'failed': True,
|
|
|
|
'module_stdout': res.get('stdout', ''),
|
|
|
|
# 'module_rc': res['rc'],
|
|
|
|
'module_stderr': res.get('stderr', ''),
|
|
|
|
# 'msg': 'The module exited with a non-zero rc but was not marked as failed. This indicates a module execution failure.'
|
|
|
|
}
|
|
|
|
# }
|
|
|
|
|
|
|
|
# if 'module_stdout' not in data:
|
|
|
|
|
|
|
|
# data |= {
|
|
|
|
|
|
|
|
# 'module_stdout': res.get('stdout', ''),
|
|
|
|
|
|
|
|
# 'module_stderr': res.get('stderr', ''),
|
|
|
|
|
|
|
|
# }
|
|
|
|
|
|
|
|
|
|
|
|
# mark the entire module results untrusted as a template right here, since the current action could
|
|
|
|
# mark the entire module results untrusted as a template right here, since the current action could
|
|
|
|
# possibly template one of these values.
|
|
|
|
# possibly template one of these values.
|
|
|
|