ansible-collections / community.hashi_vault

Ansible collection for managing and working with HashiCorp Vault.
https://docs.ansible.com/ansible/devel/collections/community/hashi_vault/index.html
GNU General Public License v3.0
80 stars 58 forks source link

Add the option to set the cert_auth_public/private_key parameter using variables #428

Closed RoeeFabrikantSAP closed 4 months ago

RoeeFabrikantSAP commented 4 months ago
SUMMARY

would it be possible to add an option to set the cert_auth_public_key and cert_auth_private_key parameters using the variables ansible_hashi_vault_cert_auth_public_key and ansible_hashi_vault_cert_auth_private_key?

AWX does not allow setting environment variables with the ANSIBLE_ prefix, which makes it hard to use the plugin

Thanks!

ISSUE TYPE
COMPONENT NAME

community.hashi_vault.hashi_vault lookup

ADDITIONAL INFORMATION
      cert_auth_public_key:
        env:
          - name: ANSIBLE_HASHI_VAULT_CERT_AUTH_PUBLIC_KEY
        vars:
          - name: ansible_hashi_vault_cert_auth_public_key
        ini:
          - section: hashi_vault_collection
            key: cert_auth_public_key
      cert_auth_private_key:
        env:
          - name: ANSIBLE_HASHI_VAULT_CERT_AUTH_PRIVATE_KEY
        vars:
          - name: ansible_hashi_vault_cert_auth_private_key
        ini:
          - section: hashi_vault_collection
            key: cert_auth_private_key
briantist commented 4 months ago

Thanks @RoeeFabrikantSAP , is this something you would be interested in putting up a PR for? It should be a pretty straightforward change.

RoeeFabrikantSAP commented 4 months ago

@briantist Sure, I'll create the PR. Thanks.

RoeeFabrikant commented 4 months ago

PR created: https://github.com/ansible-collections/community.hashi_vault/pull/429