# Use of synchronize ask a password

**URL:** <https://forum.ansible.com/t/use-of-synchronize-ask-a-password/26051>\
**Category:** Ansible Project\
**Created:** [November 16, 2017, 9:53pm UTC](https://forum.ansible.com/t/use-of-synchronize-ask-a-password/26051 "2017-11-16T21:53:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![lidor.ettinger](https://avatars.discourse-cdn.com/v4/letter/l/bbce88/32.png) [@lidor.ettinger](https://forum.ansible.com/u/lidor.ettinger)\
**Post date:** [November 16, 2017, 9:53pm UTC](https://forum.ansible.com/t/use-of-synchronize-ask-a-password/26051/1 "2017-11-16T21:53:39Z")

</div>

Hi there,

I’m using a synchronize task:  
[http://docs.ansible.com/ansible/latest/synchronize\_module.html](http://docs.ansible.com/ansible/latest/synchronize_module.html)

```auto
- synchronize:
    src: some/relative/path
    dest: /some/absolute/path

```

```auto
So far so good but i expected that Ansible won't ask me for entering a password and that what's happening.

```

```auto
How can i explicit the password or supply it within the task?

```

```auto
Thx 

```

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [November 17, 2017, 7:20am UTC](https://forum.ansible.com/t/use-of-synchronize-ask-a-password/26051/2 "2017-11-17T07:20:08Z")

</div>

You can't, you need to use keys.

---

<div class="post-metadata">

**Author:** ![lidor.ettinger](https://avatars.discourse-cdn.com/v4/letter/l/bbce88/32.png) [@lidor.ettinger](https://forum.ansible.com/u/lidor.ettinger)\
**Post date:** [November 17, 2017, 7:46am UTC](https://forum.ansible.com/t/use-of-synchronize-ask-a-password/26051/3 "2017-11-17T07:46:42Z")

</div>

There are some documents or example that you can forward me in order to understand how should i do that

thanks

---

<div class="post-metadata">

**Author:** ![lidor.ettinger](https://avatars.discourse-cdn.com/v4/letter/l/bbce88/32.png) [@lidor.ettinger](https://forum.ansible.com/u/lidor.ettinger)\
**Post date:** [November 17, 2017, 10:35am UTC](https://forum.ansible.com/t/use-of-synchronize-ask-a-password/26051/4 "2017-11-17T10:35:18Z")

</div>

Hi,

I solved it with another solution. so if someone will be interested

- name: Copy over SCP  
local\_action: “command sshpass -p {{pass}} scp -r $LOCAL\_FOLDER {{user}}@$IP\_DEST:$DEST\_FOLDER”

---

<div class="post-metadata">

**Author:** ![Moreno\_Garcia](https://avatars.discourse-cdn.com/v4/letter/m/e19b73/32.png) [@Moreno\_Garcia](https://forum.ansible.com/u/Moreno_Garcia)\
**Post date:** [November 17, 2017, 1:51pm UTC](https://forum.ansible.com/t/use-of-synchronize-ask-a-password/26051/5 "2017-11-17T13:51:07Z")

</div>

I use scp-copy-id (on Ubuntu)

[https://linux.die.net/man/1/ssh-copy-id](https://linux.die.net/man/1/ssh-copy-id)
