[WARNING]: Module remote_tmp /root/.ansible/tmp did not exist and was created with a mode of 0700

5,833 views
Skip to first unread message

Arbab Nazar

unread,
Sep 25, 2018, 12:25:29 PM9/25/18
to Ansible Project
I am in the process of porting my code from ansible 2.4.2 to ansible 2.6.x and getting of a lot of this warning,

[WARNING]: Module remote_tmp /root/.ansible/tmp did not exist and was created with a mode of 0700, this may cause issues when running as another user. To avoid this, create the
remote_tmp dir with the correct permissions manually

can someone let me know how to fix that warning. Do we need to create the /root/.ansible/tmp ahead or any other fix for this.

advance thanks

Guillaume Jeanne

unread,
Sep 25, 2018, 12:56:46 PM9/25/18
to ansible...@googlegroups.com
Yes if you read carrefuly the warning, it tell you to create it manually.

--
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 ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/0124d72f-80d5-4421-a76f-634e47403b62%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Barry Kaplan

unread,
Oct 17, 2018, 11:40:36 AM10/17/18
to Ansible Project
What would be the "correct permissions" in this case?

Yuri Kanivetsky

unread,
Jan 23, 2019, 7:44:21 AM1/23/19
to Ansible Project
On Wednesday, October 17, 2018 at 6:40:36 PM UTC+3, Barry Kaplan wrote:
What would be the "correct permissions" in this case?

Yeah, that is not really clear.

Yuri Kanivetsky

unread,
Jan 23, 2019, 8:13:43 AM1/23/19
to Ansible Project
On second thought the idea is probably that the user is made responsible for choosing correct permissions. Most of the time the default behavior of autocreating the dir is probably enough. Except that you might want to get rid of the warning. But not always.

Let's consider my case. My playbook contains a bunch of tasks performed under the root account, then a site/app user is created, and there follows another bunch of tasks for the just created user. If all the following tasks are performed under one account, then the user is to be the owner, and permission 0700. If not, you've got to make this directory writable for all involved parties. Or so my understanding is.

The interesting thing is that the warning is not displayed before running root tasks. But that is probably since I connect as root, not connect as one user and switch to another one.
Reply all
Reply to author
Forward
0 new messages