Hi,

I´d like to sync logfiles from a remote ubuntu 12.04 server to my local 
computer:

That´s what my Playbook looks like:

- hosts: "{{targets}}" 
  vars: 
     remote_user: "{{username}}"
  tasks: 

    - name: Synchronize log files
      synchronize:  src=/var/log/apache2/ dest=/Users/me/Desktop/logs/ mode=
pull
      sudo: yes 

unfortuntely it fails with:

msg: sudo: no tty present and no askpass program specified
Sorry, try again.

If I run the playbook without *sudo:yes* I get a permission denied as the 
specified user is not member 
of root or adm group.

(That´s what the Remote Folder looks like )

drwxr-x---  3 root   adm        12288 Mar 15 06:25 apache2


I think a workaround could be to add the user to root or adm group or 
change chmod of the remote folder,
but this is a kind of ugly. Is there a way to grant rights (sudo -i)  to 
the user via ansible?

best,

anatol

-- 
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/43808ee5-81a0-4a9a-9b6e-86b798416952%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to