I think Lars answered your direct question well but I saw unarchive, idempotence, and zip mixed together here so I thought I should also make sure that you were using idempotence to mean, "unless the inputs change, the state will not change". From looking at the unarchive code recently, I saw that what people sometimes mean by idempotence (that the ansible return value of change=False if no changes were performed) were not true for unarchiving zip files unless create= is specified.. After some research it appeared that zip isn't a standard enough format to easily tell whether the files in the archive match with the files on disk. It might be possible to partially implement (IIRC, using the python ZipFile module it looked possible to confirm file existence and checksums but modes and owner:group information had to be accessed as extended information that differed depending on the tool that/platform on which the zip file was created.)
Using zip with creates would solve that (but with the issue you noticed) or using tar as it doesn't suffer from this problem.
-Toshio
> --
> You received this message because you are subscribed to the Google Groups "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
> To post to this group, send email to ansible...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/db0eecaf-d860-431e-94ba-35d6e33d0c25%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.