You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# /net_home/ansible/.ansible/collections/ansible_collections
Collection Version
------------------ -------
azure.azcollection 1.16.0
CONFIGURATION
CONFIG_FILE() = /etc/ansible/ansible.cfg
OS / ENVIRONMENT
RHEL8 VM in Azure USGovCloud (USGovVirginia)
STEPS TO REPRODUCE
- name: Look up secret when ansible host is MSI enabled Azure VMdebug:
msg: "the value of this secret is {{ lookup( 'azure.azcollection.azure_keyvault_secret', 'mysecret', vault_url='https://<vaultname>.vault.usgovcloudapi.net' ) }}"
EXPECTED RESULTS
ok: [localhost] =>
msg: the value of this secret is myvalue
ACTUAL RESULTS
fatal: [localhost]: FAILED! =>
msg: 'An unhandled exception occurred while running the lookup plugin ''azure.azcollection.azure_keyvault_secret''. Error was a <class ''ansible.errors.AnsibleError''>, original message: Failed to fetch secret mysecret.. Failed to fetch secret mysecret.'
The text was updated successfully, but these errors were encountered:
SUMMARY
The azure_keyvault_secret lookup does not work with USGovCloud, presumably because the resource url is hard-coded to
https://vault.azure.net
.azure/plugins/lookup/azure_keyvault_secret.py
Line 132 in 5916552
After manually modifying this to
https://vault.usgovcloudapi.net
, my lookup works.ISSUE TYPE
COMPONENT NAME
azure_keyvault_secret
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
RHEL8 VM in Azure USGovCloud (USGovVirginia)
STEPS TO REPRODUCE
EXPECTED RESULTS
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: