mirror of
https://github.com/ansible/awx.git
synced 2026-01-21 22:48:02 -03:30
inventory plugin inventory parameter take precedence over env vars
This commit is contained in:
parent
48fb1e973c
commit
d518891520
@ -1464,8 +1464,9 @@ class gce(PluginFileInjector):
|
||||
def inventory_as_dict(self, inventory_update, private_data_dir):
|
||||
ret = super().inventory_as_dict(inventory_update, private_data_dir)
|
||||
credential = inventory_update.get_cloud_credential()
|
||||
# TODO: Align precedence of ENV vs. inventory config w/ Ansible behavior
|
||||
ret['projects'] = [credential.get_input('project', default='')]
|
||||
# InventorySource.source_vars take precedence over ENV vars
|
||||
if 'projects' not in ret:
|
||||
ret['projects'] = [credential.get_input('project', default='')]
|
||||
return ret
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user