diff --git a/lib/ansible/plugins/connection/ssh.py b/lib/ansible/plugins/connection/ssh.py index 80a9fccb550..9eced8120b1 100644 --- a/lib/ansible/plugins/connection/ssh.py +++ b/lib/ansible/plugins/connection/ssh.py @@ -629,7 +629,7 @@ class Connection(ConnectionBase): in_data = u"{0} {1} {2}\n".format(sftp_action, pipes.quote(in_path), pipes.quote(out_path)) elif method == 'scp': if sftp_action == 'get': - cmd = self._build_command('scp', u'{0}:{1}'.format(host, pipes.quote(out_path)), in_path) + cmd = self._build_command('scp', u'{0}:{1}'.format(host, pipes.quote(in_path)), out_path) else: cmd = self._build_command('scp', in_path, u'{0}:{1}'.format(host, pipes.quote(out_path))) in_data = None