mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
parent
5bbf0d9cb6
commit
3965689328
6 changed files with 9 additions and 9 deletions
|
@ -90,17 +90,17 @@ class ActionBase(with_metaclass(ABCMeta, object)):
|
|||
* Module parameters. These are stored in self._task.args
|
||||
"""
|
||||
|
||||
result = {'skipped': True}
|
||||
result = {}
|
||||
|
||||
if self._task.async and not self._supports_async:
|
||||
result['msg'] = 'async is not supported for this task.'
|
||||
result['failed'] = True
|
||||
elif self._play_context.check_mode and not self._supports_check_mode:
|
||||
result['msg'] = 'check mode is not supported for this task.'
|
||||
result['skipped'] = True
|
||||
elif self._task.async and self._play_context.check_mode:
|
||||
result['msg'] = 'check mode and async cannot be used on same task.'
|
||||
else:
|
||||
# we run!
|
||||
del result['skipped']
|
||||
result['failed'] = True
|
||||
|
||||
return result
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ class ActionModule(ActionBase):
|
|||
|
||||
result = super(ActionModule, self).run(tmp, task_vars)
|
||||
|
||||
if result.get('skipped', False):
|
||||
if result.get('skipped', False) or result.get('failed', False):
|
||||
return result
|
||||
|
||||
# Parse out any hostname:port patterns
|
||||
|
|
|
@ -84,7 +84,7 @@ class ActionModule(ActionBase):
|
|||
|
||||
result = super(ActionModule, self).run(tmp, task_vars)
|
||||
|
||||
if result.get('skipped', False):
|
||||
if result.get('skipped', False) or result.get('failed', False):
|
||||
return result
|
||||
|
||||
if task_vars is None:
|
||||
|
|
|
@ -40,7 +40,7 @@ class ActionModule(ActionBase):
|
|||
|
||||
result = super(ActionModule, self).run(tmp, task_vars)
|
||||
|
||||
if result.get('skipped'):
|
||||
if result.get('skipped', False) or result.get('failed', False):
|
||||
return result
|
||||
|
||||
source = self._task.args.get('src', None)
|
||||
|
|
|
@ -38,7 +38,7 @@ class ActionModule(ActionBase):
|
|||
|
||||
result = super(ActionModule, self).run(tmp, task_vars)
|
||||
|
||||
if result.get('skipped', False):
|
||||
if result.get('skipped', False) or result.get('failed', False):
|
||||
return result
|
||||
|
||||
module = self._task.args.get('use', 'auto')
|
||||
|
|
|
@ -37,7 +37,7 @@ class ActionModule(ActionBase):
|
|||
|
||||
result = super(ActionModule, self).run(tmp, task_vars)
|
||||
|
||||
if result.get('skipped', False):
|
||||
if result.get('skipped', False) or result.get('failed', False):
|
||||
return result
|
||||
|
||||
module = self._task.args.get('use', 'auto').lower()
|
||||
|
|
Loading…
Reference in a new issue