How to use variables from ansible.cfg in custom module

Hi,

I am working on a custom module and would like to use variables from ansible.cfg in the python script. Specifically, I need to use DEFAULT_REMOTE_TMP. How can I access this from within my module ?

modules only get data passed to themin options, they don't have access
to ansible.cfg, variables or facts directly, but you do execute the
modules in that remote temp directory so __file__ should have the
path.

Using os.path.expanduser(file) I was able to get the temporary directory and use it in my code.

Thanks so much Brian!