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

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

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
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Build succeeded.

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded (gate pipeline).

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit f608570 into ansible:devel Apr 24, 2019
shanemcd pushed a commit to shanemcd/awx that referenced this pull request Sep 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants