Dynamically alter remote_tmp

I have a simple problem. I’m pushing up a tarball with the unarchive module, and the dest setting is pointing to a large volume. However it unarchive module pushes the file to the remote_tmp dir 1st. This is on /home be default, however /home isnt big enough to take the tarball on the system machine image. The copy module also has the same problem. Altering the remote_tmp variable in the .cfg file is easy enough, however this then affects everything on the ansible system, and will break other things. Therefore I need to be able to set this variable on the fly in the role, or worst case the play. However all my attempts seem to get ignored.

I have tried the following on the cli

-e “ANSIBLE_REMOTE_TEMP=/cedar/”
and

-e “remote_tmp=/cedar/”

ive also done the following in the play and the role

environment:
remote_tmp=/cedar/.tmp
ANSIBLE_REMOTE_TEMP=/cedar/.tmp

Both modules still write to ~/.ansible/tmp as their tmp dir though

remote_tmp is set in ansible.cfg and ANSIBLE_REMOTE_TEMP should be a env var BEFORE ansible runs not inside Ansible:

ANSIBLE_REMOTE_TEMP=/cedar/.tmp ansible-playbook play.yml …