Throw an error if multiple actions have been specified

pull/1684/merge
Daniel Hokka Zakrisson 12 years ago
parent 1e0295c7e2
commit 43bdec8b20

@ -45,6 +45,8 @@ class Task(object):
# code to allow for saying "modulename: args" versus "action: modulename args"
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.pop(x)

Loading…
Cancel
Save