Re: [ansible-project] Re: Problems with permissions accesing files with sudo

2014-07-02 Thread Michael DeHaan
sudo: true in ansible affects the remote (managed) nodes. The user running ansible will need to be able to access the files on the local end, so sudo ansible itself in that case if you need to read /tmp/root.txt and can't as you. On Wed, Jul 2, 2014 at 3:33 AM, wrote: > > My question is how

Re: [ansible-project] Re: Problems with permissions accesing files with sudo

2014-07-02 Thread micafer
My question is how can I copy a file from the Ansible node to the configured nodes when the file is only accessible by the root user. Using the copy module directly does not work, so now I have to make some tricky tasks like that: - hosts: all sudo: true tasks: - local_action: shell cp

Re: [ansible-project] Re: Problems with permissions accesing files with sudo

2014-07-01 Thread Michael DeHaan
This traceback is because the local ansible can't access the file, though we do consider tracebacks in Ansible to be bugs - in this case this is a closed ticket. If you are seeing problems in the most recent release where you are getting a traceback, please do make sure there is a bug filed - howe

[ansible-project] Re: Problems with permissions accesing files with sudo

2014-07-01 Thread micafer
Now I have seen an issue in the Ansible github with the same problem: https://github.com/ansible/ansible/issues/6948 It provides a patch to solve the error, but it only changes the error message. The original error was: TASK: [copy src=/tmp/root.txt dest=/tmp/pr.txt] **