From e760b5e42982fa0825348bcafb24cea9087927b8 Mon Sep 17 00:00:00 2001 From: Kate Case Date: Tue, 11 Jul 2023 15:13:45 -0400 Subject: [PATCH 1/3] Indicate that ssh_args will be removed. --- changelogs/fragments/ssh_args.yaml | 3 +++ docs/ansible.netcommon.libssh_connection.rst | 6 +++--- plugins/connection/libssh.py | 12 +++++++++--- 3 files changed, 15 insertions(+), 6 deletions(-) create mode 100644 changelogs/fragments/ssh_args.yaml diff --git a/changelogs/fragments/ssh_args.yaml b/changelogs/fragments/ssh_args.yaml new file mode 100644 index 000000000..a25f0821b --- /dev/null +++ b/changelogs/fragments/ssh_args.yaml @@ -0,0 +1,3 @@ +--- +deprecated_features: + - The ssh_*_args options are now marked that they will be removed after 2026-01-01. diff --git a/docs/ansible.netcommon.libssh_connection.rst b/docs/ansible.netcommon.libssh_connection.rst index 513cd2276..42a5b4628 100644 --- a/docs/ansible.netcommon.libssh_connection.rst +++ b/docs/ansible.netcommon.libssh_connection.rst @@ -291,7 +291,7 @@ Parameters
Arguments to pass to all ssh CLI tools.
ProxyCommand is the only supported argument.
-
This option is deprecated in favor of proxy_command.
+
This option is deprecated in favor of proxy_command and will be removed in a release after 2026-01-01.
@@ -316,7 +316,7 @@ Parameters
Common extra arguments for all ssh CLI tools.
ProxyCommand is the only supported argument.
-
This option is deprecated in favor of proxy_command.
+
This option is deprecated in favor of proxy_command and will be removed in a release after 2026-01-01.
@@ -341,7 +341,7 @@ Parameters
Extra arguments exclusive to the 'ssh' CLI tool.
ProxyCommand is the only supported argument.
-
This option is deprecated in favor of proxy_command.
+
This option is deprecated in favor of proxy_command and will be removed in a release after 2026-01-01.
diff --git a/plugins/connection/libssh.py b/plugins/connection/libssh.py index 58e415145..cd10a3a58 100644 --- a/plugins/connection/libssh.py +++ b/plugins/connection/libssh.py @@ -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' @@ -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' @@ -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 @@ -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": From e88e00b541712c30e299d558e4b7055604c330fe Mon Sep 17 00:00:00 2001 From: Kate Case Date: Mon, 31 Jul 2023 12:24:58 -0400 Subject: [PATCH 2/3] Fix pep8 issue --- tests/unit/mock/loader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/mock/loader.py b/tests/unit/mock/loader.py index 4b359fbed..3792f2cd4 100644 --- a/tests/unit/mock/loader.py +++ b/tests/unit/mock/loader.py @@ -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__() From b9124fec45d4d6727069637c316b17aafda902a3 Mon Sep 17 00:00:00 2001 From: Kate Case Date: Mon, 31 Jul 2023 12:39:26 -0400 Subject: [PATCH 3/3] Update changelog to specify libssh --- changelogs/fragments/ssh_args.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelogs/fragments/ssh_args.yaml b/changelogs/fragments/ssh_args.yaml index a25f0821b..64c02a692 100644 --- a/changelogs/fragments/ssh_args.yaml +++ b/changelogs/fragments/ssh_args.yaml @@ -1,3 +1,3 @@ --- deprecated_features: - - The ssh_*_args options are now marked that they will be removed after 2026-01-01. + - libssh - the ssh_*_args options are now marked that they will be removed after 2026-01-01.