Yup. It is non-sudo and non-root.
$ ansible --version
ansible 1.7.1
stanza:
---
- hosts: myservers
roles:
- httpd
remote_user: "{{ lookup('env','USER') }}"
gather_facts: False
sudo: False
$ ansible-playbook -i test myservers.yml
fatal: [my-box] => failed to parse: {"msg": "Could not replace file:
/home/steinim/.ansible/tmp/ansible-tmp-1410212872.62-18948176608778/source
to /etc/httpd/conf/httpd.conf: [Errno 1] Operation not permitted:
'/etc/httpd/conf/.ansible_tmpy33qxVhttpd.conf'", "failed": true}
Exception OSError: (2, 'No such file or directory',
'/etc/httpd/conf/.ansible_tmpy33qxVhttpd.conf') in <bound method
_TemporaryFileWrapper.__del__ of <closed file '<fdopen>', mode 'w+b' at
0x1e946f0>> ignored
Since I am in the group developers and have write access to the file and
directory I would expect that I can overwrite the file.
kl. 23:36:02 UTC+2 mandag 8. september 2014 skrev Michael DeHaan følgende:
>
> Can you please share the ansible --version as well as the command line
> invocation you are using and the stanza of your playbook?
>
> Sounds like you are doing something non-sudo most likely, or non root,
> that doesn't have enough permissions.
>
>
>
> On Mon, Sep 8, 2014 at 7:50 AM, Stein Inge Morisbak <[email protected]
> <javascript:>> wrote:
>
>> I am trying to run the following task:
>>
>> - name: copy httpd.conf to /etc/httpd/conf folder
>> copy: src=httpd.conf dest="/etc/httpd/conf"
>>
>> Ownership on the server is:
>>
>> drwxrwsr-x 2 root developers 4096 Sep 8 13:33 .
>> drwxrwsr-x 5 root developers 4096 Sep 4 17:51 ..
>> -rw-rw-r-- 1 root developers 34744 Apr 3 16:01 httpd.conf
>>
>> I am a member of the developers group. The directory and file has write
>> permission for the developers group. However the task fails with this error
>> message:
>>
>> fatal: [my-box] => failed to parse: {"msg": "Could not replace file:
>> /home/steinim/.ansible/tmp/ansible-tmp-1410176741.01-248154513611723/source
>> to /etc/httpd/conf/httpd.conf: [Errno 1] Operation not permitted:
>> '/etc/httpd/conf/.ansible_tmpZ7a3MQhttpd.conf'", "failed": true}
>>
>> Am I missing something, or should this work?
>>
>> --
>> 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] <javascript:>.
>> To post to this group, send email to [email protected]
>> <javascript:>.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/ansible-project/90f29162-3cd1-4783-a3ca-ada6c1fd5604%40googlegroups.com
>>
>> <https://groups.google.com/d/msgid/ansible-project/90f29162-3cd1-4783-a3ca-ada6c1fd5604%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/7d4c1995-1eb9-4baa-9940-a5b98fc960da%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.