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

120 views
Skip to first unread message

cos...@gmail.com

unread,
Jun 3, 2015, 11:36:34 AM6/3/15
to ansible...@googlegroups.com
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

Trond Hindenes

unread,
Jun 3, 2015, 3:13:00 PM6/3/15
to ansible...@googlegroups.com
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

cos...@gmail.com

unread,
Jun 4, 2015, 4:54:49 AM6/4/15
to ansible...@googlegroups.com
Thanks Trond,

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

Kind Regards,
Constantin

Trond Hindenes

unread,
Jun 4, 2015, 4:48:20 PM6/4/15
to ansible...@googlegroups.com
Great! I'll re-submit the PR to get it included into modules_extra.
Reply all
Reply to author
Forward
0 new messages