Thanks -- this seemed like exactly what I was hoping to find/hear. When I 
edit my inventory file to include this, though, I get the same end result. 
Here's the specific error:

*eyepi | UNREACHABLE! => {*

*    "changed": false,*

*    "msg": "Failed to create temporary directory. In some cases, you may 
have been able to authenticate and did not have permissions on the target 
directory. Consider changing the remote tmp path in ansible.cfg to a path 
rooted in \"/tmp\", for more error information use -vvv. Failed command 
was: ( umask 77 && mkdir -p \"` echo /tmp `\"&& mkdir \"` echo 
/tmp/ansible-tmp-1672839839.263514-8286-43205166856478 `\" && echo 
ansible-tmp-1672839839.263514-8286-43205166856478=\"` echo 
/tmp/ansible-tmp-1672839839.263514-8286-43205166856478 `\" ), exited with 
result 127",*

*    "unreachable": true*

*}*
Without that change, the message is different in that the path is different:

*eyepi | UNREACHABLE! => {*

*    "changed": false,*

*    "msg": "Failed to create temporary directory. In some cases, you may 
have been able to authenticate and did not have permissions on the target 
directory. Consider changing the remote tmp path in ansible.cfg to a path 
rooted in \"/tmp\", for more error information use -vvv. Failed command 
was: ( umask 77 && mkdir -p \"` echo /root/.ansible/tmp `\"&& mkdir \"` 
echo /root/.ansible/tmp/ansible-tmp-1672840043.972852-8434-37499021304293 
`\" && echo ansible-tmp-1672840043.972852-8434-37499021304293=\"` echo 
/root/.ansible/tmp/ansible-tmp-1672840043.972852-8434-37499021304293 `\" ), 
exited with result 127",*

*    "unreachable": true*

*}*

Which of course makes sense. Now, when I manually ssh to that host, with 
the same stored credentials (root), I can make new directories in /tmp so 
it seems like it ought to work. I confess I am not a shell scripting 
wizard, so I get a little lost trying to follow exactly what's happening 
with the various echos in there, one of which appears to be using a 
relative path instead of absolute. The result 127 -- is that ansible 
specific? If not, google tells me it's "command not found" but the only 
commands I see there are umask, mkdir, and echo, all of which I tried and 
exist.

Anyone have a clue what I might be doing wrong?
On Tuesday, January 3, 2023 at 2:19:22 PM UTC-5 [email protected] wrote:

> Add this to the host's inventory entry:
>
> ansible_remote_tmp=/tmp
>
>
> On Tue, 3 Jan 2023 at 17:24, Tom Stewart <[email protected]> wrote:
> >
> > Using ansible to help manage my collection of raspberry pi's. One in 
> particular is running an "embedded" version of the OS that doesn't have the 
> normal temp directory. Is there any way in my inventory file to specify 
> where the temp directory is for this computer?
> >
> > Here's the output I receive when attempting an ad-hoc 'uptime' command:
> >
> > eyepi | UNREACHABLE! => {
> >
> > "changed": false,
> >
> > "msg": "Failed to create temporary directory. In some cases, you may 
> have been able to authenticate and did not have permissions on the target 
> directory. Consider changing the remote tmp path in ansible.cfg to a path 
> rooted in \"/tmp\", for more error information use -vvv. Failed command 
> was: ( umask 77 && mkdir -p \"` echo /root/.ansible/tmp `\"&& mkdir \"` 
> echo /root/.ansible/tmp/ansible-tmp-1672762692.032167-4139-89985814812145 
> `\" && echo ansible-tmp-1672762692.032167-4139-89985814812145=\"` echo 
> /root/.ansible/tmp/ansible-tmp-1672762692.032167-4139-89985814812145 `\" ), 
> exited with result 127",
> >
> > "unreachable": true
> >
> > }
> >
> > --
> > 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/ansible-project/e6e1c208-f1aa-4807-9bfe-3b0f92ae2565n%40googlegroups.com
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/be203f1e-1faa-401a-bf29-3af54d1cef23n%40googlegroups.com.

Reply via email to