win_get_url and win_msi - file downloaded and installed even when not changed

Hi All,

I’m using “win_get_url” module to download an MSI package and then “win_msi” to install it.
It turns out that every time I run a playbook both tasks return status “changed” even the file was previously downloaded and installed in the preceding run.

Am I right that these modules do not support idempotence yet?

I was expected the same behaviour as in Linux (like yum, etc) - they do not report/change if nothing has changed in system from previous run.

Could you please advise?

Kind Regards,
Constantin

None of those modules perform any checking on wether the file is already downloaded /msi is already installed, so the behaviour you see is per design.

There is a win_package available which is built on the same code as the “Package” DSC resource and more robust. I thought there was a PR for that one, but seems that it got lost in the module restructuring. Anyways, you can find it here:

https://github.com/ansible/ansible/pull/8860

Thanks Trond,

Just replaced “win_msi” with “win_package” in task and it works fine.

Kind Regards,
Constantin

Great! I’ll re-submit the PR to get it included into modules_extra.