summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorYunge Zhu <37337818+yungezz@users.noreply.github.com>2018-06-04 12:57:02 +0800
committerZim Kalinowski <zikalino@microsoft.com>2018-06-04 12:57:02 +0800
commitbd34194ace161ed66ed85e0e6508cac93f5affd7 (patch)
treea68f4e3abe4fec2226f3e4e45adbc44077561c10 /contrib
parent033adf8cd5850508b9213515cca10fa11b2c4e90 (diff)
downloadansible-bd34194ace161ed66ed85e0e6508cac93f5affd7.tar.gz
add adfs_authority_url arg in azure_rm.py (#41071)
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/inventory/azure_rm.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/contrib/inventory/azure_rm.py b/contrib/inventory/azure_rm.py
index 5de5d244fe..60e027619a 100755
--- a/contrib/inventory/azure_rm.py
+++ b/contrib/inventory/azure_rm.py
@@ -326,10 +326,10 @@ class AzureRM(object):
# get authentication authority
# for adfs, user could pass in authority or not.
# for others, use default authority from cloud environment
- if self.credentials.get('adfs_authority_url') is None:
- self._adfs_authority_url = self._cloud_environment.endpoints.active_directory
- else:
+ if self.credentials.get('adfs_authority_url'):
self._adfs_authority_url = self.credentials.get('adfs_authority_url')
+ else:
+ self._adfs_authority_url = self._cloud_environment.endpoints.active_directory
# get resource from cloud environment
self._resource = self._cloud_environment.endpoints.active_directory_resource_id
@@ -627,6 +627,8 @@ class AzureInventory(object):
help='Active Directory User')
parser.add_argument('--password', action='store',
help='password')
+ parser.add_argument('--adfs_authority_url', action='store',
+ help='Azure ADFS authority url')
parser.add_argument('--cloud_environment', action='store',
help='Azure Cloud Environment name or metadata discovery URL')
parser.add_argument('--resource-groups', action='store',