J'essaie de devenir un utilisateur "oracle" dans ansible en utilisant le playbook suivant :
- hosts: "myhost"
tasks:
- name: install oracle client
become: yes
become_user: oracle
become_method: su
shell: |
whoami
args:
chdir: /tmp/client
environment:
DISTRIB: /tmp/client
Je reçois une erreur :
"msg": "Failed to set permissions on the temporary files Ansible needs to create when becoming an unprivileged user (rc: 1, err: chown: changing ownership of `/tmp/ansible-tmp-1513617986.78-246171259298529/': Operation not permitted\nchown: changing ownership of `/tmp/ansible-tmp-1513617986.78-246171259298529/command.py': Operation not permitted\n}). For information on working around this, see https://docs.ansible.com/ansible/become.html#becoming-an-unprivileged-user"
J'ai lu l'article " https://docs.ansible.com/ansible/become.html#becoming-an-unprivileged-user "
et a ajouté ce qui suit à /etc/ansible/ansible.cfg sans effet.
allow_world_readable_tmpfiles = True
Ma version d'Ansible :
ansible 2.4.2.0
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/dist-packages/ansible
executable location = /usr/bin/ansible
python version = 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609]
Question : Existe-t-il un moyen de configurer mon hôte pour qu'il accepte qu'ansible devienne l'utilisateur d'oracle ?