mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-02 16:53:11 +00:00
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.
This commit is contained in:
@@ -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 = {}
|
||||
|
||||
Reference in New Issue
Block a user