The win_package module works better in my opinion (not merged yet).
However you need to set the name of the package properly, which I've only
been able to figure out by installing each package by hand and searching
the registry for the name.  The name has to match exactly.

I've also found some msi files that appear to have no name set.

On Fri, Oct 3, 2014 at 3:29 PM, Chris Church <[email protected]> wrote:

> Taking a closer look at that module, I think you've found a bug.  I'll
> work on a fix and some tests.
>
> https://github.com/ansible/ansible-modules-core/issues/129
>
>
> On Fri, Oct 3, 2014 at 1:07 PM, nfwlpw <[email protected]> wrote:
>
>> Can anyone confirm this is how it works?  I used a file that already
>> exists but ansible still seem to tried to install (I saw msiexec being
>> started).  Nothing in the output indicates it skipped the task either:
>>
>>
>> TASK: [win_msi path="c:\\temp\\NewRelicAgent_x64_3.6.177.0.msi"
>> creates="C:\\Program Files\\New Relic" state=present] ***
>> changed: [qa01rlaffvm01.qa.ruelala.lan]
>>
>> PLAY RECAP
>> ********************************************************************
>> qa01rlaffvm01.qa.ruelala.lan : ok=2    changed=1    unreachable=0
>> failed=0
>>
>> This is the same output regardless if I have creates set or not
>>
>>
>>
>> On Friday, October 3, 2014 12:19:34 PM UTC-4, Chris Church wrote:
>>>
>>> creates=somefile does not make ansible create a file; it causes the
>>> module to run *only* if the file is missing.
>>>
>>> You should check for the existence of a file installed by the MSI, e.g.:
>>>
>>> creates="C:\\Program Files\\New Relic\\Agent.exe"
>>>
>>>
>>>
>>> On Fri, Oct 3, 2014 at 10:18 AM, nfwlpw <[email protected]> wrote:
>>>
>>>> I'm using ansible 1.7.2, here's my very basic playbook:
>>>>
>>>> ---
>>>> - hosts: all
>>>>   tasks:
>>>>   - win_msi: path=C:\\temp\\NewRelicAgent_x64_3.6.177.0.msi
>>>> creates=C:\\temp\\NewRelicAgent_x64_3.6.177.0.txt state=present
>>>>
>>>>
>>>> I expect ansible to create the file specified, but that does not seem
>>>> to be the case.  From looking at the win_msi module (I know nothing of
>>>> powershell), it only checks the existence, but doesn't actually creates
>>>> anything?  Moreover, if I create C:\\temp\\NewRelicAgent_x64_3.6.177.0.txt
>>>> manually, ansible still goes on and install the MSI.
>>>>
>>>> How is it supposed to work?
>>>>
>>>>
>>>>  --
>>>> 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 [email protected].
>>>> To post to this group, send email to [email protected].
>>>> To view this discussion on the web visit https://groups.google.com/d/
>>>> msgid/ansible-project/6d5952c0-afc8-4d2b-8053-
>>>> 668df4075ace%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/ansible-project/6d5952c0-afc8-4d2b-8053-668df4075ace%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>  --
>> 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 [email protected].
>> To post to this group, send email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/ansible-project/a0a5807d-d8af-4569-b7de-444698dd2b33%40googlegroups.com
>> <https://groups.google.com/d/msgid/ansible-project/a0a5807d-d8af-4569-b7de-444698dd2b33%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --
> 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 [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CAH%2BKTJ40bgZiD3zO6pf-2b3VFP4pZVGuhY_zqptxRPet2iDzGA%40mail.gmail.com
> <https://groups.google.com/d/msgid/ansible-project/CAH%2BKTJ40bgZiD3zO6pf-2b3VFP4pZVGuhY_zqptxRPet2iDzGA%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CALGZhhsy1_%2BZy1qo60_SNEaiBGxjs-GchRqXeYKwCksbtMzjCg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to