From a906638f7f59d97cb9a31d072f65b6e1e51417df Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Thu, 8 Jul 2021 15:48:28 -0400 Subject: [PATCH 1/5] deprecate scp_if_ssh --- changelogs/fragments/deprecate_scp_if_ssh.yml | 2 ++ lib/ansible/plugins/connection/ssh.py | 5 +++++ 2 files changed, 7 insertions(+) create mode 100644 changelogs/fragments/deprecate_scp_if_ssh.yml diff --git a/changelogs/fragments/deprecate_scp_if_ssh.yml b/changelogs/fragments/deprecate_scp_if_ssh.yml new file mode 100644 index 00000000000000..7b87bd70770943 --- /dev/null +++ b/changelogs/fragments/deprecate_scp_if_ssh.yml @@ -0,0 +1,2 @@ +deprecated: + - ssh connection plugin option scp_if_ssh in favor of ssh_transfer_method. diff --git a/lib/ansible/plugins/connection/ssh.py b/lib/ansible/plugins/connection/ssh.py index da7f38704a8e6a..e4f7c2668ab528 100644 --- a/lib/ansible/plugins/connection/ssh.py +++ b/lib/ansible/plugins/connection/ssh.py @@ -289,12 +289,17 @@ - "Preferred method to use when transfering files over ssh" - When set to smart, Ansible will try them until one succeeds or they all fail - If set to True, it will force 'scp', if False it will use 'sftp' + - It will overriden by ssh_transfer_method, if set env: [{name: ANSIBLE_SCP_IF_SSH}] ini: - {key: scp_if_ssh, section: ssh_connection} vars: - name: ansible_scp_if_ssh version_added: '2.7' + deprecated: + why: In favor of the "ssh_transfer_method" option. + version: "2.16" + alternatives: ssh_trasnfer_method use_tty: version_added: '2.5' default: 'yes' From f4eb8c1b9e04730c3d0ac9bb8d27e5e1857c9270 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Thu, 8 Jul 2021 15:56:22 -0400 Subject: [PATCH 2/5] Update lib/ansible/plugins/connection/ssh.py Co-authored-by: Matt Martz --- lib/ansible/plugins/connection/ssh.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/plugins/connection/ssh.py b/lib/ansible/plugins/connection/ssh.py index e4f7c2668ab528..b7c9565b4f9755 100644 --- a/lib/ansible/plugins/connection/ssh.py +++ b/lib/ansible/plugins/connection/ssh.py @@ -299,7 +299,7 @@ deprecated: why: In favor of the "ssh_transfer_method" option. version: "2.16" - alternatives: ssh_trasnfer_method + alternatives: ssh_transfer_method use_tty: version_added: '2.5' default: 'yes' From 8f6fdf5c6900a766871d5f36f10ae6c5eabf58cf Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Thu, 8 Jul 2021 16:04:51 -0400 Subject: [PATCH 3/5] removed comment(diff pr) and pushed back dep --- lib/ansible/plugins/connection/ssh.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/ansible/plugins/connection/ssh.py b/lib/ansible/plugins/connection/ssh.py index b7c9565b4f9755..c02d58b8083a15 100644 --- a/lib/ansible/plugins/connection/ssh.py +++ b/lib/ansible/plugins/connection/ssh.py @@ -289,7 +289,6 @@ - "Preferred method to use when transfering files over ssh" - When set to smart, Ansible will try them until one succeeds or they all fail - If set to True, it will force 'scp', if False it will use 'sftp' - - It will overriden by ssh_transfer_method, if set env: [{name: ANSIBLE_SCP_IF_SSH}] ini: - {key: scp_if_ssh, section: ssh_connection} @@ -298,7 +297,7 @@ version_added: '2.7' deprecated: why: In favor of the "ssh_transfer_method" option. - version: "2.16" + version: "2.17" alternatives: ssh_transfer_method use_tty: version_added: '2.5' From c17105eb596e7d82eb5f255fa0fa494a9b75a15f Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Mon, 30 Aug 2021 10:34:20 -0400 Subject: [PATCH 4/5] moved --- lib/ansible/plugins/connection/ssh.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/ansible/plugins/connection/ssh.py b/lib/ansible/plugins/connection/ssh.py index c02d58b8083a15..8344b3bef30646 100644 --- a/lib/ansible/plugins/connection/ssh.py +++ b/lib/ansible/plugins/connection/ssh.py @@ -284,6 +284,10 @@ - name: ansible_ssh_transfer_method version_added: '2.12' scp_if_ssh: + deprecated: + why: In favor of the "ssh_transfer_method" option. + version: "2.17" + alternatives: ssh_transfer_method default: smart description: - "Preferred method to use when transfering files over ssh" @@ -295,10 +299,6 @@ vars: - name: ansible_scp_if_ssh version_added: '2.7' - deprecated: - why: In favor of the "ssh_transfer_method" option. - version: "2.17" - alternatives: ssh_transfer_method use_tty: version_added: '2.5' default: 'yes' From 3fbffc6cb8d18ce7395eb09bfaddaee546ad3805 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Mon, 30 Aug 2021 10:36:34 -0400 Subject: [PATCH 5/5] fixed clog --- changelogs/fragments/deprecate_scp_if_ssh.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelogs/fragments/deprecate_scp_if_ssh.yml b/changelogs/fragments/deprecate_scp_if_ssh.yml index 7b87bd70770943..b2425e019dd297 100644 --- a/changelogs/fragments/deprecate_scp_if_ssh.yml +++ b/changelogs/fragments/deprecate_scp_if_ssh.yml @@ -1,2 +1,2 @@ -deprecated: +deprecated_features: - ssh connection plugin option scp_if_ssh in favor of ssh_transfer_method.