diff options
author | Yuwei Zhou <yuwzho@microsoft.com> | 2018-06-28 17:00:21 +0800 |
---|---|---|
committer | Yunge Zhu <37337818+yungezz@users.noreply.github.com> | 2018-06-28 17:00:21 +0800 |
commit | 60ea14fe1f8e594a23c21fc06ae6cf8aeb5d84dc (patch) | |
tree | fae55490939ff91a9fb59877d8ac1196ac4756fb /contrib | |
parent | fa2366079ab371c47407e10c2212b35a1cfc9f42 (diff) | |
download | ansible-60ea14fe1f8e594a23c21fc06ae6cf8aeb5d84dc.tar.gz |
Retrive subscription id from env (#42036)
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/inventory/azure_rm.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/contrib/inventory/azure_rm.py b/contrib/inventory/azure_rm.py index 59e0b70146..d68c83fae4 100755 --- a/contrib/inventory/azure_rm.py +++ b/contrib/inventory/azure_rm.py @@ -425,6 +425,7 @@ class AzureRM(object): def _get_msi_credentials(self, subscription_id_param=None): credentials = MSIAuthentication() + subscription_id_param = subscription_id_param or os.environ.get(AZURE_CREDENTIAL_ENV_MAPPING['subscription_id'], None) try: # try to get the subscription in MSI to test whether MSI is enabled subscription_client = SubscriptionClient(credentials) |