mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
parent
ecf867af6f
commit
d02dee37a1
1 changed files with 6 additions and 1 deletions
|
@ -63,8 +63,13 @@ class ActionModule(ActionBase):
|
||||||
dest = self._task.args.get('dest', None)
|
dest = self._task.args.get('dest', None)
|
||||||
faf = self._task.first_available_file
|
faf = self._task.first_available_file
|
||||||
force = boolean(self._task.args.get('force', True))
|
force = boolean(self._task.args.get('force', True))
|
||||||
|
state = self._task.args.get('state', None)
|
||||||
|
|
||||||
if (source is None and faf is not None) or dest is None:
|
if state is not None:
|
||||||
|
result['failed'] = True
|
||||||
|
result['msg'] = "'state' cannot be specified on a template"
|
||||||
|
return result
|
||||||
|
elif (source is None and faf is not None) or dest is None:
|
||||||
result['failed'] = True
|
result['failed'] = True
|
||||||
result['msg'] = "src and dest are required"
|
result['msg'] = "src and dest are required"
|
||||||
return result
|
return result
|
||||||
|
|
Loading…
Reference in a new issue