-
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
Add support for Windows hosts in the SSH connection plugin #47732
Conversation
Hi @jborean93, thank you for submitting this pull-request! |
This comment has been minimized.
This comment has been minimized.
@jborean93 We'll want additional logic in the ansible-test change classification code to handle this. We already have this logic: ansible/test/runner/lib/classification.py Lines 419 to 422 in 4ec2423
We probably need to add something like this: windows_integration_name = 'connection_windows_%s' % name
if windows_integration_name not in self.integration_targets_by_name:
windows_integration_name = None Then add it to the return values here: ansible/test/runner/lib/classification.py Lines 447 to 450 in 4ec2423
|
I new to Ansible but not to Windows or scripting. It shoudn't be that much job to rewrite thoose scripts though and as I understand it WINRM could still be used if a rewrite isn't doable. For me the main benefit with SSH transport is the possibility to use jump/bastion-hosts to reach the systems I want to manage. Can I live with having powershell as defaultshell to get that capability - H-ll Yes ! |
@matsmcp the latest commit adds support for the default shell choice of cmd. So this can now work with both cmd and PowerShell as the DefaultShell. You just need to set |
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.
Just the one suggestion about setting the shell type in inventory, otherwise looking good. Code itself is ready to merge IMO.
Some wordsmithing and spelling/grammar tweaks needed needed in the docs, but I'll let @acozine do her thing with that, as she may want reorg or changes anyway.
That sounds great. |
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 added a couple of commits with most of my docs change ideas. I forgot the changelog fragment, though, so adding that here.
Co-Authored-By: jborean93 <jborean93@gmail.com>
unrelated SSL failure on Ubuntu |
SUMMARY
2nd attempt at implementing Windows support with the SSH connection plugin. Basic tests indicate exec, fetch, and copy all work fine over SSH.
Known issues:
piped
transfer method does not work, it uses thedd
command which Windows does not supportpowershell.py
shell plugin that strips out the leading\\
chars in the network pathVery basic timing checks, ssh is still roughly .2 seconds slower than the
winrm
plugin on awin_ping
adhoc command but exponentially faster with file copy operations as expected.Fixes #25344
ISSUE TYPE
COMPONENT NAME
ssh
ANSIBLE VERSION