-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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
VMware: vmware_tools connection plugin #55059
Conversation
715bed9
to
cb77c2c
Compare
@Akasurde @dericcrago @pdellaert @Im0 @tchernomax @dagwieers @jborean93 @nitzmahone @verdel PTAL. This is a cleanup of #47072 addressing most of the feedback. |
18cb8aa
to
5b9301e
Compare
@ckotte @jeking3 @Tomorrow9 @alongchamps @adarobin @goneri Could you please review this ? |
@jamescassell Thanks for working on this. Let me know if you need any help with this. |
@jamescassell I added changes here - jamescassell#1 feel free to modify. |
1d016a9
to
12a3b3e
Compare
@Akasurde I added your changes, re-added the VI_* env vars, and then squashed to one commit per contibutor so ansibot will be happy to merge it once approved. |
c91b31b
to
0e8efb2
Compare
@Akasurde I've integrated the last two of your suggestions. (Shippable seems broken, however... which seems unrelated) |
Looks like it boils down to:
I can likely get the first 3, but I need to know what the default value should be for I'm not sure if I can just drop/replace I won't be able to test any changes I make until 7 hours from now. (I have, of course, tested the PR as-is.) |
92c1841
to
feda014
Compare
- connection_address -> vmware_host - connection_username -> vmware_user - connection_password -> vmware_password - connection_verify_ssl -> validate_certs - connection_ignore_ssl_warnings -> silence_tls_warnings - ansible_vmware_tools_vm_path -> ansible_vmware_guest_path - standardize user/pass vars - fallback to default ansible conneciton vars - accept VMware standard env vars: https://code.vmware.com/docs/6536/vsphere-sdk-for-perl-programming-guide/doc/GUID-66555F76-570A-4C76-BEA7-6C371BF685D6.html - note lack of "become" support - add example usage - more reasonable default sleep interval - auto-silence tls warnings if validate_certs=false - get_option for executable - remove unsafe 'makedirs_safe'
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
feda014
to
4eb8a8c
Compare
Done.
Changed default to
Done.
Will not do, as urls.py doesn't support chunked downloads and the rest of vmware in ansible also requires requests. Otherwise, I think I've addressed all feedback. I've also tested these changes in my environment, and everything seems to be functional. ready_for_review |
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
DOCUMENTATION = """ | ||
author: Deric Crago <deric.crago@gmail.com> | ||
connection: vmware_tools | ||
short_description: Execute tasks inside a VM via VMware Tools |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i would mention this plugin is Windows specific
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Plugin works for both linux and windows.
super(Connection, self).__init__(*args, **kwargs) | ||
if hasattr(self, "_shell") and self._shell.SHELL_FAMILY == "powershell": | ||
self.module_implementation_preferences = (".ps1", ".exe", "") | ||
self.become_methods = ["runas"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these settings make this a 'windows only' connection , but examples above suggest otherwise, which is it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It supports both. If SHELL_FAMILY=powershell, it does this special magic. If not, it "just works" for Linux otherwise.
@Akasurde thanks for all your help on this and for merging! @dericcrago thanks for writing it to begin with! |
SUMMARY
I've updated the referenced PR
Fixes: #47072
ISSUE TYPE
COMPONENT NAME
vmware_tools
ADDITIONAL INFORMATION
I've integrated the changes from TLS standardization and connection_var standardization. I also added support for the VI_* env vars standardized by vmware sdk.
I'm punting this for now. I'd want to do an integration test, but that requires a full VMware setup.
I added an EXAMPLES block.
This PR intends to show what 'finished' looks like.