# synchronize same remote directories without ssh using password auth

**URL:** <https://forum.ansible.com/t/synchronize-same-remote-directories-without-ssh-using-password-auth/33387>\
**Category:** Ansible Project\
**Created:** [July 13, 2020, 12:26pm UTC](https://forum.ansible.com/t/synchronize-same-remote-directories-without-ssh-using-password-auth/33387 "2020-07-13T12:26:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Luca\_remix\_tj\_Lorenz](https://avatars.discourse-cdn.com/v4/letter/l/ea666f/32.png) [@Luca\_remix\_tj\_Lorenz](https://forum.ansible.com/u/Luca_remix_tj_Lorenz)\
**Post date:** [July 13, 2020, 12:26pm UTC](https://forum.ansible.com/t/synchronize-same-remote-directories-without-ssh-using-password-auth/33387/1 "2020-07-13T12:26:34Z")

</div>

Hello,

i'm hitting a hidden requirement of the synchronize module, which is  
sshpass, if you're using password authentication.

I'm running this task to align the content of a dir with another. The  
entire playbook is runned against a single host, with become: true  
option set for all the playbook.

&nbsp;&nbsp;- name: Synchronize app dir  
&nbsp;&nbsp;&nbsp;&nbsp;synchronize:  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;src: "/opt/admin/update/{{ timestamp }}/{{ asset\_name }}/{{ app\_name }}/"  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dest: "{{ deploy\_path\_app }}/"  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;owner: yes  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;group: yes  
&nbsp;&nbsp;&nbsp;&nbsp;delegate\_to: "{{ inventory\_hostname }}"

What happens is that the module, when invoking with user/password at  
CLI with -k -K:

sshpass -d4 /usr/bin/rsync --delay-updates -F --compress --archive  
--out-format=\<\<CHANGED\>\>%i %n%L  
/opt/admin/update/20200713T135450/A01/AppName/  
/opt/applicationserver/app/AppName/

But I'm running a synchronization between local directories, why do i  
require sshpass? I'd like to skip this requirement because i don't  
want to install sshpass in each host where i'm running synchronize.

Is there any way to skip usage of sshpass?

Luca
