From various playing around and troubleshooting over the last year or two I think Ansible takes a playbook with plays using azure_rm modules from azcollection then, creates an Azure ARM Template (and maybe parameter file), puts it into a zip file and then uses the Azure REST API to deploy it.
I’m wondering if there is a way I can tell Ansible not to delete that zip file so that I can inspect it.
It does not. Under the covers azcollection is just a fancy way of invoking the Azure python SDK with an Ansible front end.
The only archive files that are moved around are if you’re using a remote host to execute the modules, then the playbooks and some supporting stuff will be tarballed up and copied to the remote host over ssh … where it will call the Azure python SDK.
EDIT: Note that I’m not talking about the 1 specific module that actually does ARM template deployments, that one actually is using ARM templates, but they’re not spontaneously generated, they’re an input parameter.
You didn't say what you're actually trying to achieve (and that
doesn't work, I assume, as you're posting to a support mailing list).
I mean the problem why you need to 'inspect' things (again, assuming
something is wrong).
Now we also know that you posted the same text to Reddit, and you're
copying the answer back to this mailing list (aka "cross posting").
Perhaps you could start by telling what you are trying to achieve?