exec from /tmp permission denied

In our environment we do not allow execution from /tmp.

So:

Julians-Macbook-Pro:deploy_with_ansible julianbrown$ cat ansible.cfg
[defaults]
inventory = myhosts.ini
remote_tmp = ~/.ansible/tmp
local_tmp = ~/.ansible/tmp

[ssh_connection]
ssh_args=-o ForwardAgent=yes

I tell it to use ~/.ansible/tmp

Playbook:

Julians-Macbook-Pro:deploy_with_ansible julianbrown$ cat deploy_julian_bin.yml

Try setting remote_tmp to /var/tmp. There is an issue with remote_tmp
and permission downscaling, Ansible currently defaults to /tmp to
compensate for this. This setting is global but I'm working on making
it host specific and allow to specify the fallback/system temp dirs
when needed.

https://github.com/ansible/ansible/pull/31677

OK I tried that, but it insists on using /tmp for that git execution. Ansible may not be usable by me, dang this is a show stopper.

I worked around it by using “command:” and putting a git command in there.

If I were more confident in what I am doing, I would file a bug report. It looks like the “git:” command does not look at remote_tmp.

Thanx

Julian

Ah, nvmd, git module has it's own wrapper, try setting environemnt:
TEMP or TMP=/var/tmp, git module uses mktemp function to create it's
own temporary wrapper file. (also planning on fixing this)