在 2015年10月5日星期一 UTC+8下午11:59:55,johhue写道:
>
> This will not work for us. We have to give the password as part of our 
> security rules.
>
>
>
> On Sunday, October 4, 2015 at 6:01:04 AM UTC-7, johhue wrote:
>>
>> Hello, I have seen many similar topics but want to make sure my issue is 
>> the same.
>>
>> Our enterprise is taking a look at Ansible to handle non-root tasks. I am 
>> trying to use the synchronize module but having many issues getting it to 
>> work with sudo.
>>
>> Assume no root access, and the maintenance user we can connect with has 
>> SUDO to other users.
>>
>> Task:
>>
>> - name:
>>   when: app_user|default(None) != None
>>   become: yes
>>   become_user: "{{ app_user }}"
>>   become_method: sudo
>>   synchronize: src=x dest=/app//{{ app_user }}/testx
>>
>>
>> Fails with this error:
>>
>> msg: sudo: no tty present and no askpass program specified
>> rsync: connection unexpectedly closed (0 bytes received so far) [sender]
>> rsync error: error in rsync protocol data stream (code 12) at io.c(600) 
>> [sender=3.0.6]
>>
>> Any ideas?
>>
>> I have tried messing with the rsync_path --
>>
>> I dont want to mess around too much as I am afraid my sudo password I 
>> type in will end in plain text somewhere.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/cc16f603-08f2-4af3-80a8-ebdd17ba1359%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to