From 43bdec8b20b9c05bc2eb00d7090ffaf833577829 Mon Sep 17 00:00:00 2001 From: Daniel Hokka Zakrisson Date: Mon, 26 Nov 2012 22:42:44 +0100 Subject: [PATCH] Throw an error if multiple actions have been specified --- lib/ansible/playbook/task.py | 2 ++ 1 file changed, 2 insertions(+) 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)