Ansible temp dir change
Q: &quot;Is it possible to change ansible temp dir for one playbook only? I have VMs with r/o root.&quot;

A: Yes. It's possible. Configure the variable ansible_remote_tmp.
In some cases, a better solution to this problem is ANSIBLE_PIPELINING. Quoting from Risks and limitations of become:

Use pipelining. When pipelining is enabled, Ansible does not save the module to a temporary file on the client. Instead, it pipes the module to the remote python interpreter’s stdin. Pipelining does not work for python modules involving file transfer (for example: copy, fetch, template), or for non-python modules.


Notes:

Quoting from Release notes:


The ANSIBLE_REMOTE_TMP environment variable has been added to supplement (and override) ANSIBLE_REMOTE_TEMP. This matches the spelling of the config value. ANSIBLE_REMOTE_TEMP will be deprecated in the future.


remote_tmp is not among configuration options in Ansible Configuration Settings

See remote_tmp parameter of the sh plugin.

There are open bugs mostly with Windows