Hi,
I have this error:
TASK [ceph-mon : create a local fetch directory if it does not exist]
**********
task path: /Users/stephane/projets/tech-angels/test_ceph/vagrant/roles/ceph-
mon/tasks/docker/create_configs.yml:2
Using module file /usr/local/lib/python2.7/site-packages/ansible/modules/
core/files/file.py
<localhost> ESTABLISH LOCAL CONNECTION FOR USER: stephane
<localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo
$HOME/.ansible/tmp/ansible-tmp-1481019912.14-221559219655965 `" && echo
ansible-tmp-1481019912.14-221559219655965="` echo
$HOME/.ansible/tmp/ansible-tmp-1481019912.14-221559219655965 `" ) && sleep
0'
<localhost> PUT /var/folders/7v/bs1393w960b4_g1_2b5h9sf00000gn/T/tmpSVsFnm
TO /Users/stephane/.ansible/tmp/ansible-tmp-1481019912.14-221559219655965/
file.py
<localhost> EXEC /bin/sh -c 'chmod u+x
/Users/stephane/.ansible/tmp/ansible-tmp-1481019912.14-221559219655965/
/Users/stephane/.ansible/tmp/ansible-tmp-1481019912.14-221559219655965/file.py
&& sleep 0'
<localhost> EXEC /bin/sh -c 'sudo -H -S -n -u root /bin/sh -c '"'"'echo
BECOME-SUCCESS-drwxnaweihqdaahqciaxhgilzausrdhj;
/usr/local/opt/python/bin/python2.7
/Users/stephane/.ansible/tmp/ansible-tmp-1481019912.14-221559219655965/file.py;
rm -rf
"/Users/stephane/.ansible/tmp/ansible-tmp-1481019912.14-221559219655965/" >
/dev/null 2>&1'"'"' && sleep 0'
fatal: [ceph-test-1 -> localhost]: FAILED! => {
"changed": false,
"failed": true,
"invocation": {
"module_name": "file"
},
"module_stderr": "sudo: a password is required\n",
"module_stdout": "",
"msg": "MODULE FAILURE"
}
With this code:
- name: create a local fetch directory if it does not exist
local_action: file path={{ fetch_directory }} state=directory
changed_when: false
become: false
run_once: true
when: cephx or generate_fsid
Original source code is here:
https://github.com/ceph/ceph-ansible/blob/master/roles/ceph-mon/tasks/docker/create_configs.yml#L2
Question: why if I have *`become: false*` file action use sudo ?
Best regards,
Stéphane
--
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/97395166-6cc3-4063-8e56-35855c31e041%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.