Hello Johue, I ended up turning sudo to NOPASS during the action and resetting it afterwards.
Regards Mirko -- Sent from my mobile Am 04.10.2015 15:01 schrieb "johhue" <[email protected]>: > 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 [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/2e9d2c84-cb85-42ba-8cd2-48d4820f5e29%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/2e9d2c84-cb85-42ba-8cd2-48d4820f5e29%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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 [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAK8jvqy6GMS%2BLT0ktwXQOgXmqEfTo2eMmQHxKO_yQD2sXf--Hw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
