mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Throw an error if multiple actions have been specified
This commit is contained in:
parent
1e0295c7e2
commit
43bdec8b20
1 changed files with 2 additions and 0 deletions
|
@ -45,6 +45,8 @@ class Task(object):
|
||||||
|
|
||||||
# code to allow for saying "modulename: args" versus "action: modulename args"
|
# code to allow for saying "modulename: args" versus "action: modulename args"
|
||||||
if x in utils.plugins.module_finder:
|
if x in utils.plugins.module_finder:
|
||||||
|
if 'action' in ds:
|
||||||
|
raise errors.AnsibleError("multiple actions specified in task %s" % (ds.get('name', ds['action'])))
|
||||||
ds['action'] = x + " " + ds[x]
|
ds['action'] = x + " " + ds[x]
|
||||||
ds.pop(x)
|
ds.pop(x)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue