# Issue 15405 : Synchronized failed with delegate\_to and sudo password

**URL:** <https://forum.ansible.com/t/issue-15405-synchronized-failed-with-delegate-to-and-sudo-password/21335>\
**Category:** Ansible Developer\
**Created:** [May 2, 2016, 8:43pm UTC](https://forum.ansible.com/t/issue-15405-synchronized-failed-with-delegate-to-and-sudo-password/21335 "2016-05-02T20:43:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Guillaume\_Dufour](https://avatars.discourse-cdn.com/v4/letter/g/22d042/32.png) [@Guillaume\_Dufour](https://forum.ansible.com/u/Guillaume_Dufour)\
**Post date:** [May 2, 2016, 8:43pm UTC](https://forum.ansible.com/t/issue-15405-synchronized-failed-with-delegate-to-and-sudo-password/21335/1 "2016-05-02T20:43:24Z")

</div>

Hello,

i found a regression (maybe it’s a normal change of API) on the synchronized module on the 2.0.1. I try on 1.9.5 and it’ work.

My use case is :

- i have a bastion to access to all host and my ssh config use the proxycommand to do it.

- i use my personnal account to access to host and then do a sudo to deploy with the applicative account

- and i want to synchronized tow nodes

My problem is in 1.9.5, ansible do the following process :

- ssh connect with my account

- sudo and provide my password

- do the rsync with the deploy account to the other host with the same account

In 2.0.1, ansible do:

- ssh connect
- rsync (with my account) with rsync with sudo (when become is activate) but don’t use the become user and don’t provide my sudo passord.

So rsync return, sudo ask a password but there no tty… normal ;o(

So i propose 3 solutions :

- keep the become on the delegate\_to side as before
- add specific args to module to move become on delegate side
- provide password with an echo ‘password’ | sudo -s -u become\_user rsync on rsync path

For this last one, i try it , but not work due to a exclamation point in my password so i think i have a problem with single quote…

what i can do ? what do you prefere ?

---

<div class="post-metadata">

**Author:** ![Guillaume\_Dufour](https://avatars.discourse-cdn.com/v4/letter/g/22d042/32.png) [@Guillaume\_Dufour](https://forum.ansible.com/u/Guillaume_Dufour)\
**Post date:** [May 25, 2016, 1:53pm UTC](https://forum.ansible.com/t/issue-15405-synchronized-failed-with-delegate-to-and-sudo-password/21335/2 "2016-05-25T13:53:25Z")

</div>

up
