In a case where all but url is specified as lookup keywords, and we intentionally omit the scheme, you can see the templating makes it into the error message:
localhost | FAILED! => {
"msg": "An unhandled exception occurred while running the lookup plugin 'community.hashi_vault.hashi_vault'.
Error was a <class 'requests.exceptions.MissingSchema'>, original message:
Invalid URL '{{ vault_fqdn }}/v1/internal/data/tf': No scheme supplied. Perhaps you meant https://{{ vault_fqdn }}/v1/internal/data/tf?.
Invalid URL '{{ vault_fqdn }}/v1/internal/data/tf': No scheme supplied. Perhaps you meant https://{{ vault_fqdn }}/v1/internal/data/tf?"
}
SUMMARY
When I set
ansible_hashi_vault_
variables as below, they are taken literally and not templated:In a case where all but
url
is specified as lookup keywords, and we intentionally omit the scheme, you can see the templating makes it into the error message:ISSUE TYPE
COMPONENT NAME
hashi_vault
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
n/a
STEPS TO REPRODUCE
EXPECTED RESULTS
Templating should work so that I can work with different vault clusters and configs in a playbook run as necessary.
ACTUAL RESULTS
Errors result from template attempts. Only literal values are used.