mirror of
https://github.com/ansible/awx.git
synced 2026-03-17 17:07:33 -02:30
Enable source variables for Azure inventory
This commit is contained in:
committed by
Bill Nottingham
parent
475a2bd9bb
commit
4b7f106e9f
@@ -1946,12 +1946,17 @@ class RunInventoryUpdate(BaseTask):
|
||||
cp.set(section, 'group_by_resource_group', 'yes')
|
||||
cp.set(section, 'group_by_location', 'yes')
|
||||
cp.set(section, 'group_by_tag', 'yes')
|
||||
|
||||
if inventory_update.source_regions and 'all' not in inventory_update.source_regions:
|
||||
cp.set(
|
||||
section, 'locations',
|
||||
','.join([x.strip() for x in inventory_update.source_regions.split(',')])
|
||||
)
|
||||
|
||||
azure_rm_opts = dict(inventory_update.source_vars_dict.items())
|
||||
for k,v in azure_rm_opts.items():
|
||||
cp.set(section, k, six.text_type(v))
|
||||
|
||||
# Return INI content.
|
||||
if cp.sections():
|
||||
f = cStringIO.StringIO()
|
||||
|
||||
Reference in New Issue
Block a user