Commit 0f0f5ff1 by Michael Scherer

Give more information when a task is empty

I made a typo in a playbook and was great by:

    ERROR: expecting dict; got: None

The issue was a single - on the last line of a playbook.
With the name of the file, I was able to see right away where the
error was.
parent e83a494e
......@@ -505,7 +505,7 @@ class Play(object):
included_additional_conditions = list(old_conditions)
if not isinstance(x, dict):
raise errors.AnsibleError("expecting dict; got: %s" % x)
raise errors.AnsibleError("expecting dict; got: %s, error in %s" % (x, original_file))
# evaluate sudo vars for current and child tasks
included_sudo_vars = {}
......
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