Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hashi_vault - add alternate methods (env, ini, vars) for ca_cert option #97

Merged
merged 3 commits into from
Jun 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions changelogs/fragments/97-ca_cert-env-and-vars.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
minor_changes:
- hashi_vault - add ``ANSIBLE_HASHI_VAULT_CA_CERT`` env var (with ``VAULT_CACERT`` low-precedence fallback) for ``ca_cert`` option (https://github.com/ansible-collections/community.hashi_vault/pull/97).
- hashi_vault - add ``ansible_hashi_vault_ca_cert`` ansible var for ``ca_cert`` option (https://github.com/ansible-collections/community.hashi_vault/pull/97).
- hashi_vault - add ``ca_cert`` INI config file key ``ca_cert`` option (https://github.com/ansible-collections/community.hashi_vault/pull/97).
10 changes: 10 additions & 0 deletions plugins/doc_fragments/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,16 @@ class ModuleDocFragment(object):
version_added: '1.1.0'
ca_cert:
description: Path to certificate to use for authentication.
env:
- name: ANSIBLE_HASHI_VAULT_CA_CERT
version_added: '1.2.0'
ini:
- section: lookup_hashi_vault
key: ca_cert
version_added: '1.2.0'
vars:
- name: ansible_hashi_vault_ca_cert
version_added: '1.2.0'
aliases: [ cacert ]
validate_certs:
description:
Expand Down
1 change: 1 addition & 0 deletions plugins/module_utils/_hashi_vault_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ class HashiVaultOptionGroupBase:
'namespace': ['VAULT_NAMESPACE'],
'token': ['VAULT_TOKEN'],
'url': ['VAULT_ADDR'],
'ca_cert': ['VAULT_CACERT'],
}

def __init__(self, option_adapter):
Expand Down