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

Indicate that ssh_args will be removed. #566

Merged
merged 3 commits into from
Jul 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions changelogs/fragments/ssh_args.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
deprecated_features:
- libssh - the ssh_*_args options are now marked that they will be removed after 2026-01-01.
6 changes: 3 additions & 3 deletions docs/ansible.netcommon.libssh_connection.rst
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ Parameters
<td>
<div>Arguments to pass to all ssh CLI tools.</div>
<div>ProxyCommand is the only supported argument.</div>
<div>This option is deprecated in favor of <em>proxy_command</em>.</div>
<div>This option is deprecated in favor of <em>proxy_command</em> and will be removed in a release after 2026-01-01.</div>
</td>
</tr>
<tr>
Expand All @@ -316,7 +316,7 @@ Parameters
<td>
<div>Common extra arguments for all ssh CLI tools.</div>
<div>ProxyCommand is the only supported argument.</div>
<div>This option is deprecated in favor of <em>proxy_command</em>.</div>
<div>This option is deprecated in favor of <em>proxy_command</em> and will be removed in a release after 2026-01-01.</div>
</td>
</tr>
<tr>
Expand All @@ -341,7 +341,7 @@ Parameters
<td>
<div>Extra arguments exclusive to the &#x27;ssh&#x27; CLI tool.</div>
<div>ProxyCommand is the only supported argument.</div>
<div>This option is deprecated in favor of <em>proxy_command</em>.</div>
<div>This option is deprecated in favor of <em>proxy_command</em> and will be removed in a release after 2026-01-01.</div>
</td>
</tr>
<tr>
Expand Down
12 changes: 9 additions & 3 deletions plugins/connection/libssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@
description:
- Arguments to pass to all ssh CLI tools.
- ProxyCommand is the only supported argument.
- This option is deprecated in favor of I(proxy_command).
- This option is deprecated in favor of I(proxy_command) and will be removed
in a release after 2026-01-01.
type: string
ini:
- section: 'ssh_connection'
Expand All @@ -147,7 +148,8 @@
description:
- Common extra arguments for all ssh CLI tools.
- ProxyCommand is the only supported argument.
- This option is deprecated in favor of I(proxy_command).
- This option is deprecated in favor of I(proxy_command) and will be removed
in a release after 2026-01-01.
type: string
ini:
- section: 'ssh_connection'
Expand All @@ -163,7 +165,8 @@
description:
- Extra arguments exclusive to the 'ssh' CLI tool.
- ProxyCommand is the only supported argument.
- This option is deprecated in favor of I(proxy_command).
- This option is deprecated in favor of I(proxy_command) and will be removed
in a release after 2026-01-01.
type: string
vars:
- name: ansible_ssh_extra_args
Expand Down Expand Up @@ -318,6 +321,9 @@ def _get_proxy_command(self, port=22):
]

if any(ssh_args):
display.warning(
"The ssh_*_args options are deprecated and will be removed in a release after 2026-01-01. Please use the proxy_command option instead."
)
args = self._split_ssh_args(" ".join(ssh_args))
for i, arg in enumerate(args):
if arg.lower() == "proxycommand":
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/mock/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
class DictDataLoader(DataLoader):
def __init__(self, file_mapping=None):
file_mapping = {} if file_mapping is None else file_mapping
assert type(file_mapping) == dict
assert isinstance(file_mapping, dict)

super(DictDataLoader, self).__init__()

Expand Down
Loading