-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
featureThis issue/PR relates to a feature requestThis issue/PR relates to a feature requesthas_prlookuplookup pluginlookup plugin
Description
Migrated from ansible/ansible#65734
SUMMARY
Currently, hashi_vault only reports a very basic exception when it can't access a secret. On large playbooks, where many secrets are accessed, this gives no indication which secret was failing.
ISSUE TYPE
- Feature Idea
COMPONENT NAME
hashi_vault
ADDITIONAL INFORMATION
The error reported by hashi_vault currently looks like this:
failed: [localhost] (item=example) => {
"changed": false,
"item": "example",
"msg": "AnsibleError: An unhandled exception occurred while running the lookup plugin 'hashi_vault'. Error was a <class 'hvac.exceptions.Forbidden'>, original message: 1 error occurred:\n\t* permission denied\n\n"
}
This should be more like:
failed: [localhost] (item=example) => {
"changed": false,
"item": "example",
"msg": "AnsibleError: An unhandled exception occurred while running the lookup plugin 'hashi_vault'. Error was a <class 'hvac.exceptions.Forbidden'>, original message: 1 error occurred:\n\t* permission denied on secret secret=secret/example:secret\n\n"
}
Or, the hvac.exceptions.Forbidden exception should be caught by the module and handled with a proper error message.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
featureThis issue/PR relates to a feature requestThis issue/PR relates to a feature requesthas_prlookuplookup pluginlookup plugin