mirror of https://github.com/ansible/ansible.git
Fix ssh plugin to correctly fetch files when using scp (#18614)
Fetch module uses fetch_file() from plugin/connection/ssh.py to
retrieve files from the remote hosts which in turns uses
_file_transport_command(self, in_path, out_path, sftp_action) being
sftp_action = 'get'
When using scp rather than sftp, sftp_action variable is not used
and the scp command is formed in a way that the file is always
sent to the remote machine
This patch fixes _file_transport_command() to correctly form the scp
swaping src and dest if sftp_action is 'get'
Bug introduced at 8e47b9b
Fixes #18603
Signed-off-by: Alberto Murillo Silva <alberto.murillo.silva@intel.com>
pull/18641/head
parent
43714f859a
commit
ec2521f6af
Loading…
Reference in New Issue