Note
This lookup plugin is part of the azure.azcollection collection (version 3.7.0).
You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.
To install it, use: ansible-galaxy collection install azure.azcollection. You need further requirements to be able to use this lookup plugin, see Requirements for details.
To use it in a playbook, specify: azure.azcollection.azure_keyvault_secret.
New in azure.azcollection 1.12.0
The below requirements are needed on the local controller node that executes this lookup.
Parameter | Comments |
|---|---|
Terms string / required | Secret name, version can be included like secret_name/secret_version. |
This describes keyword parameters of the lookup. These are the values key1=value1, key2=value2 and so on in the following examples: lookup('azure.azcollection.azure_keyvault_secret', key1=value1, key2=value2, ...) and query('azure.azcollection.azure_keyvault_secret', key1=value1, key2=value2, ...)
Parameter | Comments |
|---|---|
client_id string | Client id of service principal that has access to the Azure Key Vault |
cloud_type string | Specify which cloud, such as |
secret string | Secret of the service principal. |
tenant_id string | Tenant id of service principal. |
use_cli string | When use_cli=True, get the ‘az lgin’ credential authentication, default if false. |
use_msi string | MSI token autodiscover, default is true. |
vault_url string / required | Url of Azure Key Vault. |
Note
lookup('azure.azcollection.azure_keyvault_secret', term1, term2, key1=value1, key2=value2) and query('azure.azcollection.azure_keyvault_secret', term1, term2, key1=value1, key2=value2)
az login is also supported.Key | Description |
|---|---|
Return value string | secret content string Returned: success |
© 2012–2018 Michael DeHaan
© 2018–2025 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/azure/azcollection/azure_keyvault_secret_lookup.html