mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-22 20:13:59 -07:00
Rename azure inventory script. Fix bug preventing AD user login via environment vars.
This commit is contained in:
parent
7a4e4c2b02
commit
af5e4abf66
4 changed files with 19 additions and 19 deletions
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# Configuration file for azure_rm_invetory.py
|
||||
# Configuration file for azure_rm.py
|
||||
#
|
||||
[azure]
|
||||
# Control which resource groups are included. By default all resources groups are included.
|
||||
|
@ -15,5 +15,5 @@ include_powerstate=yes
|
|||
# Control grouping with the following boolean flags. Valid values: yes, no, true, false, True, False, 0, 1.
|
||||
group_by_resource_group=yes
|
||||
group_by_location=yes
|
||||
group_by_security_group=no
|
||||
group_by_security_group=yes
|
||||
group_by_tag=yes
|
|
@ -115,7 +115,7 @@ When run in --list mode, instances are grouped by the following categories:
|
|||
- tag key
|
||||
- tag key_value
|
||||
|
||||
Control groups using azure_rm_inventory.ini or set environment variables:
|
||||
Control groups using azure_rm.ini or set environment variables:
|
||||
|
||||
AZURE_GROUP_BY_RESOURCE_GROUP=yes
|
||||
AZURE_GROUP_BY_LOCATION=yes
|
||||
|
@ -137,11 +137,11 @@ AZURE_TAGS=key1:value1,key2:value2
|
|||
If you don't need the powerstate, you can improve performance by turning off powerstate fetching:
|
||||
AZURE_INCLUDE_POWERSTATE=no
|
||||
|
||||
azure_rm_inventory.ini
|
||||
azure_rm.ini
|
||||
----------------------
|
||||
As mentioned above you can control execution using environment variables or an .ini file. A sample
|
||||
azure_rm_inventory.ini is included. The name of the .ini file is the basename of the inventory script (in this case
|
||||
'azure_rm_inventory') with a .ini extension. This provides you with the flexibility of copying and customizing this
|
||||
azure_rm.ini is included. The name of the .ini file is the basename of the inventory script (in this case
|
||||
'azure_rm') with a .ini extension. This provides you with the flexibility of copying and customizing this
|
||||
script and having matching .ini files. Go forth and customize your Azure inventory!
|
||||
|
||||
Powerstate:
|
||||
|
@ -310,7 +310,7 @@ class AzureRM(object):
|
|||
credentials = self._get_profile(env_credentials['profile'])
|
||||
return credentials
|
||||
|
||||
if env_credentials['client_id'] is not None:
|
||||
if env_credentials['client_id'] is not None or env_credentials['ad_user'] is not None:
|
||||
return env_credentials
|
||||
|
||||
return None
|
Loading…
Add table
Add a link
Reference in a new issue