Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify gce inventory plugin injector #3754

Merged
merged 1 commit into from Apr 24, 2019

Conversation

@AlanCoding
Copy link
Member

@AlanCoding AlanCoding commented Apr 23, 2019

SUMMARY

This consumes the change made in Ansible core:

ansible/ansible#54407

Which is in Ansible 2.8

This allows the plugin injection logic to share the script logic.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME
  • API
AWX VERSION
4.0.0
ADDITIONAL INFORMATION

This entry becomes congruent with the script environment now, see:

"GCE_CREDENTIALS_FILE_PATH": "{{ file_reference }}",

This is a very subtle change which will keep open many important possibilities if #3749 also makes it in.

  • allow refactoring the injector classes without giving the build_env methods access to the credential file paths
  • allow showing the inventory config file to the user without having to use randomized temp file names
@softwarefactory-project-zuul
Copy link
Contributor

@softwarefactory-project-zuul softwarefactory-project-zuul bot commented Apr 23, 2019

Build failed.

@@ -18,8 +18,6 @@ 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

This comment has been minimized.

@AlanCoding

AlanCoding Apr 23, 2019
Author Member

See https://docs.ansible.com/ansible/latest/modules/gce_module.html

I can find no evidence that these are employed by the gce module anywhere, and if not, they shouldn't be here.

This comment has been minimized.

@AlanCoding

AlanCoding Apr 23, 2019
Author Member

https://github.com/ansible/ansible/blob/276ad32a4535c262b9aa42c08981656344959f53/lib/ansible/module_utils/gcp.py#L110-L111

   b) GCE_PROJECT, GCE_CREDENTIAL_FILE_PATH, GCE_EMAIL (legacy, not recommended; req'd if using p12 key)

Maybe I'm wrong about this and GCE_EMAIL is still needed...

This consumes the change made in Ansible core
ansible/ansible#54407
which is in Ansible 2.8, allowing the plugin
injection logic to share the script logic and
to be simplified
@softwarefactory-project-zuul
Copy link
Contributor

@softwarefactory-project-zuul softwarefactory-project-zuul bot commented Apr 23, 2019

Build succeeded.

@AlanCoding AlanCoding force-pushed the AlanCoding:gce_env_var branch from 11d246c to c36dbb3 Apr 23, 2019
@softwarefactory-project-zuul
Copy link
Contributor

@softwarefactory-project-zuul softwarefactory-project-zuul bot commented Apr 23, 2019

Build succeeded.

@AlanCoding AlanCoding added the mergeit label Apr 24, 2019
@softwarefactory-project-zuul
Copy link
Contributor

@softwarefactory-project-zuul softwarefactory-project-zuul bot commented Apr 24, 2019

Build succeeded (gate pipeline).

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit f608570 into ansible:devel Apr 24, 2019
2 checks passed
2 checks passed
ansible/check check status: success
Details
ansible/gate gate status: success
Details
shanemcd pushed a commit to shanemcd/awx that referenced this pull request Sep 13, 2019
Upload directly 353
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.