Hi,
Thanks for sharing your code.
Are you thinking of submitting a pull request?
I too have a win unzip module which I've been working on but I'm not ready to share yet.
Did you try coding the Fail-Json calls like this (creating a new object rather than re-using $result)?
Fail-Json (New-Object psobject) "failure message goes here";
The powershell code seems to support 'include' and 'exclude' parameters, but they aren't mentioned in the docs. I can't test your code right now but if they are optional params, and you are going to create a PR I think they should be documented.
Looking back at the code I have so far, I've tried to port the parts I can of the unarchive module, so I have a a 'creates' parameter which lets you specify file that, if it exists, the unzip doesn't happen again and I've made a start on supporting ' a 'copy' option as well, so the zip can be copied from ansible master to windows guest. For copy to work I need to port the unarchive action plugin and the win_copy module which is pending V2 (mostly because I believe V2 will allow action plugins to share common code).
Would you be interested in looking through what I've got with a view to creating a PR?
All the best,
Jon