Skip to content

Commit

Permalink
Indicate that ssh_args will be removed. (#566)
Browse files Browse the repository at this point in the history
* Indicate that ssh_args will be removed.

* Fix pep8 issue

* Update changelog to specify libssh
  • Loading branch information
Qalthos committed Jul 31, 2023
1 parent 07ef0c5 commit 2e7c31e
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
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

0 comments on commit 2e7c31e

Please sign in to comment.