Closed briantist closed 3 years ago
Merging #86 (c3fea8d) into main (a6e6f37) will not change coverage. The diff coverage is
100.00%
.
@@ Coverage Diff @@
## main #86 +/- ##
=======================================
Coverage 82.88% 82.88%
=======================================
Files 16 16
Lines 783 783
Branches 78 78
=======================================
Hits 649 649
Misses 120 120
Partials 14 14
Impacted Files | Coverage Δ | |
---|---|---|
plugins/doc_fragments/connection.py | 100.00% <ø> (ø) |
|
plugins/lookup/hashi_vault.py | 63.15% <100.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update a6e6f37...c3fea8d. Read the comment docs.
cc @h3m5k @erinn @morco @elcomtik @pilou- @wenottingham @infra-monkey
Would you be able to try out this PR with AWX and see if it meets your needs for supplying values that don't rely on environment variables?
I'v tested this with AWX 15.0.1 and ansible 2.10.6 and it works like a charm. The vars included in the test were (on separate occasions): ansible_hashi_vault_url ansible_hashi_vault_addr ansible_hashi_vault_token ansible_hashi_vault_role_id ansible_hashi_vault_secret_id ansible_hashi_vault_auth_method
Let me know if you'd like me to try something else. Thanks a bunch!
@h3m5k great! thanks a lot, I really appreciate that extra testing. Given how important it is to AWX users I wanted someone to use it hands-on before merging in case anything else was needed.
SUMMARY
Fixes #49 Fixes #65
The big change here is adding
vars:
entries for several options:url ->
ansible_hashi_vault_url
ansible_hashi_vault_addr
proxies -> ansible_hashi_vault_proxies
namespace -> ansible_hashi_vault_namespace
token -> ansible_hashi_vault_token
token_validate -> ansible_hashi_vault_token_validate
role_id -> ansible_hashi_vault_role_id
secret_id -> ansible_hashi_vault_secret_id
auth_method -> ansible_hashi_vault_auth_method
Some new examples of usage:
Important Note
Using templating in task vars won't work because of https://github.com/ansible/ansible/issues/73268 so this example will fail:
Instead, use
set_fact
to ensure your vars are evaluated beforehand.Other Changes
validate_certs
option, checking different types of ways to specify yes/no, but they used environment variables via theenvironment:
keyword which doesn't affect the lookup anyway. They have been removed, as unit tests now cover the various ways of supplying that option.proxies
option as a dict via an ansible var.ISSUE TYPE
COMPONENT NAME
hashi_vault
ADDITIONAL INFORMATION