diff options
author | Daniel Hokka Zakrisson <daniel@hozac.com> | 2012-11-26 22:42:44 +0100 |
---|---|---|
committer | Daniel Hokka Zakrisson <daniel@hozac.com> | 2012-11-26 22:42:44 +0100 |
commit | 43bdec8b20b9c05bc2eb00d7090ffaf833577829 (patch) | |
tree | c1a4c6b817f06b83fd8eeab1fe3ce2f54b3069cd | |
parent | 1e0295c7e21e5c186d38e3d9898d76568bc0fce3 (diff) | |
download | ansible-43bdec8b20b9c05bc2eb00d7090ffaf833577829.tar.gz |
Throw an error if multiple actions have been specified
-rw-r--r-- | lib/ansible/playbook/task.py | 2 |
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) |