Commit 4f673b94 by James Cammarata

Merge pull request #7083 from mscherer/better_message_multiple_action

Improve error message when multiple action are given
parents 39c6141b 1e34e95b
...@@ -68,7 +68,7 @@ class Task(object): ...@@ -68,7 +68,7 @@ class Task(object):
if x in utils.plugins.module_finder: if x in utils.plugins.module_finder:
if 'action' in ds: if 'action' in ds:
raise errors.AnsibleError("multiple actions specified in task %s" % (ds.get('name', ds['action']))) raise errors.AnsibleError("multiple actions specified in task: '%s' and '%s'" % (x, ds.get('name', ds['action'])))
if isinstance(ds[x], dict): if isinstance(ds[x], dict):
if 'args' in ds: if 'args' in ds:
raise errors.AnsibleError("can't combine args: and a dict for %s: in task %s" % (x, ds.get('name', "%s: %s" % (x, ds[x])))) raise errors.AnsibleError("can't combine args: and a dict for %s: in task %s" % (x, ds.get('name', "%s: %s" % (x, ds[x]))))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment