mirror of
https://github.com/ansible/awx.git
synced 2026-07-27 07:59:54 -02:30
Simplify gce inventory plugin injector
This consumes the change made in Ansible core https://github.com/ansible/ansible/pull/54407 which is in Ansible 2.8, allowing the plugin injection logic to share the script logic and to be simplified
This commit is contained in:
@@ -18,8 +18,9 @@ def gce(cred, env, private_data_dir):
|
||||
project = cred.get_input('project', default='')
|
||||
username = cred.get_input('username', default='')
|
||||
|
||||
env['GCE_EMAIL'] = username
|
||||
env['GCE_PROJECT'] = project
|
||||
if 'INVENTORY_UPDATE_ID' not in env:
|
||||
env['GCE_EMAIL'] = username
|
||||
env['GCE_PROJECT'] = project
|
||||
json_cred = {
|
||||
'type': 'service_account',
|
||||
'private_key': cred.get_input('ssh_key_data', default=''),
|
||||
|
||||
Reference in New Issue
Block a user