diff --git a/lib/ansible/playbook/task.py b/lib/ansible/playbook/task.py index 534ea058a3..42e09601f5 100644 --- a/lib/ansible/playbook/task.py +++ b/lib/ansible/playbook/task.py @@ -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)