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 ssh_args and friends back, add var for proxy_command #78826
Conversation
There are no tests here, maybe I'll add them? Or maybe not since I'm deprecating them on adding. I should at least test that they work, which I have not done yet. EDIT: Yes, verified it works |
|
The test
|
deprecated: | ||
why: In favor of the "proxy_command" option. | ||
version: "2.18" | ||
alternatives: proxy_command |
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.
we might want also _paramiko_
versions for each var/env var/ini entry that has higher precedence, JIC people use both connections but need different configuration
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.
Since there's already a paramiko-specific option, could the priority just be reversed?
diff --git a/lib/ansible/plugins/connection/paramiko_ssh.py b/lib/ansible/plugins/connection/paramiko_ssh.py
index 82eae5c77e..5410b12b1b 100644
--- a/lib/ansible/plugins/connection/paramiko_ssh.py
+++ b/lib/ansible/plugins/connection/paramiko_ssh.py
@@ -287,7 +287,7 @@ class Connection(ConnectionBase):
if proxy_command:
break
- proxy_command = proxy_command or self.get_option('proxy_command')
+ proxy_command = self.get_option('proxy_command') or proxy_command
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.
Probably, although that logic existed before this PR, but probably makes sense.
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 looks like the vyos incidental tests pass if the ansible.builtin NetworkConnectionBase also adds the get_options
fix from ansible.netcommon ansible-collections/ansible.netcommon@130c49e.
Hrm, weird, I tested locally and at least the one target was passing. Will look into this. |
@sivel Oh, maybe it was just a flaky CI error in that case. |
Super weird. First, I was confused, since #78789 is what I thought this PR was for a moment. Second, I'm now confused by why this change causes issues for the vyos tests, I'll have to let them run again now that I pushed another commit. Maybe this PR just will need to be dependent on #78789, or I need to make the change you recommended. |
Alright, must have just been flaky. vyos tests passed this time. |
ansible#78826) Fixes ansible#78750 (cherry picked from commit 1b47def) Co-authored-by: Matt Martz <matt@sivel.net>
ansible#78826) Fixes ansible#78750 (cherry picked from commit 1b47def) Co-authored-by: Matt Martz <matt@sivel.net>
ansible#78826) Fixes ansible#78750 (cherry picked from commit 1b47def) Co-authored-by: Matt Martz <matt@sivel.net>
SUMMARY
Add ssh_args and friends back, add var for proxy_command. Fixes #78750
ISSUE TYPE
COMPONENT NAME
lib/ansible/plugins/connection/paramiko_ssh.py
ADDITIONAL INFORMATION