Skip to content

Commit

Permalink
Retrive subscription id from env (ansible#42036)
Browse files Browse the repository at this point in the history
  • Loading branch information
yuwzho authored and yungezz committed Jun 28, 2018
1 parent fa23660 commit 60ea14f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions contrib/inventory/azure_rm.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,7 @@ def _get_azure_cli_credentials(self):

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)
Expand Down

0 comments on commit 60ea14f

Please sign in to comment.