summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Hokka Zakrisson <daniel@hozac.com>2012-11-26 22:42:44 +0100
committerDaniel Hokka Zakrisson <daniel@hozac.com>2012-11-26 22:42:44 +0100
commit43bdec8b20b9c05bc2eb00d7090ffaf833577829 (patch)
treec1a4c6b817f06b83fd8eeab1fe3ce2f54b3069cd
parent1e0295c7e21e5c186d38e3d9898d76568bc0fce3 (diff)
downloadansible-43bdec8b20b9c05bc2eb00d7090ffaf833577829.tar.gz
Throw an error if multiple actions have been specified
-rw-r--r--lib/ansible/playbook/task.py2
1 files changed, 2 insertions, 0 deletions
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)