How to stop Ansible from cleaning up temporary files?

Hello!

I am debugging an Ansible playbook that throws an obscure error, the command from “-vvvv” output looks totally sane, but the SSH command does not carry useful information, it only invokes a temporary script locaed in ~/.ansible/tmp.

Unfortunately, when Ansible comes back with the error, ~/.ansible/tmp has already been cleaned up.

How to stop Ansible from cleaning up the tmp directory for this case?

Thanks.

Regards,
Howard

ANSIBLE_KEEP_REMOTE_FILES=1 ansible-playbook -vvvv …