Commit 2303f65a by Michael DeHaan

Merge pull request #1614 from dagwieers/missing-action-error

Print the task name (if any) when complaining
parents 7a485253 b96877e5
......@@ -87,7 +87,7 @@ class Task(object):
raise errors.AnsibleError("the 'action' and 'local_action' attributes can not be used together")
# Both are NOT defined
elif (not 'action' in ds) and (not 'local_action' in ds):
raise errors.AnsibleError("task missing an 'action' attribute")
raise errors.AnsibleError("'action' or 'local_action' attribute missing in task \"%s\"" % ds.get('name', '<Unnamed>'))
# Only one of them is defined
elif 'local_action' in ds:
self.action = ds.get('local_action', '')
......
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