changing remote_tmp from the playbook

190 views
Skip to first unread message

Olivier Lauret

unread,
Jun 11, 2015, 3:01:11 PM6/11/15
to ansible...@googlegroups.com
Hello,

I have an issue with the remote_tmp parameter from the ansible.cfg that I would like to change from the playbook task.

The problem I have is the way I am connecting to the servers, with the different type of users. Here are some example

Most of the connections:
    GenericUserA/AnsibleServer ====(ssh)====>connecting with GenericUserA on server1
    GenericUserA cannot use su command for security reasons as it is a generic user
    GenericUserA's home folder on server1 is /opt/app1
Some connections:
    GenericUserA/AnsibleServer ====(ssh)====>connecting with SpecificUserB on server1
    SpecificUserB can use su command as root
    SpecificUserB, like all specific users, don't have a home folder on the server and default to the root.

When using SpecificUserB, I cannot create .ansible in the root folder, so I have set the remote_tmp to /tmp. when running a playbook, /tmp/.ansible is created with SpecificUserB permission. THe problem is when I want to run another playbook with GenericUserA, it fails as GenericUserA create anything in /tmp/.ansible. Same problem with any other SpecificUsers.

Any idea on how to solve this issue?

Regards,
Olivier
Reply all
Reply to author
Forward
0 new messages