mirror of
https://github.com/ansible/awx.git
synced 2026-03-08 21:19:26 -02:30
inventory plugin inventory parameter take precedence over env vars
This commit is contained in:
committed by
Ryan Petrello
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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user