docs: def put_file(self, in_path, out_path):
          ''' transfer a file from local to remote '''
          vvv("PUT %s TO %s" % (in_path, out_path), host=self.host)
          if not os.path.exists(in_path):
              raise errors.AnsibleFileNotFound("file or module does not exist: %s" % in_path)
          cmd = self._password_cmd()
  
          if C.DEFAULT_SCP_IF_SSH:
              cmd += ["scp"] + self.common_args
              cmd += [in_path,self.host + ":" + out_path]
              indata = None
          else:
              cmd += ["sftp"] + self.common_args + [self.host]
              indata = "put %s %s\n" % (in_path, out_path)
  
          p = subprocess.Popen(cmd, stdin=subprocess.PIPE,
                               stdout=subprocess.PIPE, stderr=subprocess.PIPE)
          self._send_password()
          stdout, stderr = p.communicate(indata)
  
          if p.returncode != 0:
              raise errors.AnsibleError("failed to transfer file to %s:\n%s\n%s" % (out_path, stdout, stderr))