title: How do I save an ansible variable into a temporary file that is automatically removed at the end of playbook execution?
body: <p>In order to perform some operations locally (not on the remote machine), I need to put the content of an ansible variable inside a temporary file.</p>
  
  <p>Please note that I am looking for a solution that takes care of generating the temporary file to a location where it can be written (no hardcoded names) and also that takes care of the removal of the file as we do not want to leave things behind.</p>