ansible/lib/ansible
Adrian Likins 4befefd78c Try to show original exception info for yaml (and other) errors (#24468)
* show original exception for yaml (and other) errors

In places where we need to catch a yaml error and raise
an AnsibleError, add the orig yaml exc to the AnsibleError
via the orig_exc arg.

When the AnsibleError is displayed it will now include the
AnsibleError (AnsibleParserError for example) and the type
and message from the original yaml exception.

This provides more detail to the error messages related to
yaml errors.

This also improves errors from dataloader (for example,
previously if a wrong password was used for a vault encrypted
yaml file, the error was very vague and suggested yaml errors,
but now the message includes the original exception from vault
indicating the password was incorrect or missing).

Add a text note to playbook helper asserts. For playbook
syntax/layout errors that aren't yaml errors, but errors
indicating invalid data structures for a playbook/task/role/block,
we now include some info about where the assert was and
why it was raised.

In places we raise an AnsibleParserError in an except
clause, pass the original exception to AnsibleParserError via
orig_exc arg.

Make assorted error messages a little more specific (like
the playbook helper load methods)

* Revert "Include the original YAML error in syntax error messages"

This reverts commit 781bb44b02.
2017-06-09 13:13:15 -04:00
..
cli ansible-doc: fix exception for required field 2017-06-03 14:32:05 +02:00
compat ansible/compat/: PEP8 compliancy (#24689) 2017-05-18 08:36:11 +01:00
config
errors Try to show original exception info for yaml (and other) errors (#24468) 2017-06-09 13:13:15 -04:00
executor When cleaning up the AnsiBallZ tempdir we need to not fail if the tempdir wasn't created 2017-06-07 06:38:42 -07:00
galaxy Transition inventory into plugins (#23001) 2017-05-23 17:16:49 -04:00
inventory minor protection against bad config 2017-06-05 16:46:51 -04:00
module_utils Add support for Devuan in hostname module (#25525) 2017-06-09 08:47:09 -04:00
modules Fix import for get_exception (#25551) 2017-06-09 11:58:18 -05:00
parsing Try to show original exception info for yaml (and other) errors (#24468) 2017-06-09 13:13:15 -04:00
playbook Try to show original exception info for yaml (and other) errors (#24468) 2017-06-09 13:13:15 -04:00
plugins Platform agnostic module for VRFs (#25383) 2017-06-09 13:33:11 +02:00
template Try to show original exception info for yaml (and other) errors (#24468) 2017-06-09 13:13:15 -04:00
utils New module: manage Citrix Netscaler service configuration (network/netscaler/netscaler_service) (#25129) 2017-06-08 08:33:32 -06:00
vars Try to show original exception info for yaml (and other) errors (#24468) 2017-06-09 13:13:15 -04:00
__init__.py
constants.py Add support for cliconf and netconf plugin (#25093) 2017-06-06 13:56:25 +05:30
release.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00