mirror of
https://github.com/ansible/awx.git
synced 2026-05-16 05:47:38 -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):
|
def inventory_as_dict(self, inventory_update, private_data_dir):
|
||||||
ret = super().inventory_as_dict(inventory_update, private_data_dir)
|
ret = super().inventory_as_dict(inventory_update, private_data_dir)
|
||||||
credential = inventory_update.get_cloud_credential()
|
credential = inventory_update.get_cloud_credential()
|
||||||
# TODO: Align precedence of ENV vs. inventory config w/ Ansible behavior
|
# InventorySource.source_vars take precedence over ENV vars
|
||||||
ret['projects'] = [credential.get_input('project', default='')]
|
if 'projects' not in ret:
|
||||||
|
ret['projects'] = [credential.get_input('project', default='')]
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user