summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorYuwei Zhou <yuwzho@microsoft.com>2018-06-28 17:00:21 +0800
committerYunge Zhu <37337818+yungezz@users.noreply.github.com>2018-06-28 17:00:21 +0800
commit60ea14fe1f8e594a23c21fc06ae6cf8aeb5d84dc (patch)
treefae55490939ff91a9fb59877d8ac1196ac4756fb /contrib
parentfa2366079ab371c47407e10c2212b35a1cfc9f42 (diff)
downloadansible-60ea14fe1f8e594a23c21fc06ae6cf8aeb5d84dc.tar.gz
Retrive subscription id from env (#42036)
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/inventory/azure_rm.py1
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)