Is this a package which is publicly available? I'd like to have a closer
look.
On Friday, February 19, 2016 at 10:10:05 AM UTC+1, Gerald Spencer wrote:
>
> Interesting. So following your advice, the value in
> HKLM:\Software\microsoft\windows\currentversion\uninstall is Python 3.5*.1
> (Anaconda3 2.5.0 64-bit) *and lets say we run:
>
> - name: install conda
> win_package:
> path: '.\\Desktop\\CondaInstall.exe'
> product_id: 'Python 3.5.1 (Anaconda3 2.5.0 64-bit)'
> arguments: "/S /D=..\\Anaconda3"
>
> When the package is already installed, the task executes as expected and
> reports no change in state.
> When the package is *not* installed, one would expect for the package to
> be installed. Instead, the module fails and reports the
> $LocalizedData.PostValidationError
>
> - Package from {0} was installed, but the specified ProductId and/or
> Name does not match package details
>
> It seems to be failing somewhere around Line 925
> <https://github.com/ansible/ansible-modules-extras/blob/devel/windows/win_package.ps1#L925>in
>
> win_package with the Get-ProductEntry in the Set-TargetResource function.
> The odd thing is, when I pull out Validate-StandardArguments and
> Get-ProductEntry functions, they act as expected. i.e.
>
> - Validate-StandardArguments ensures that the path exists, reports
> that the product_id is not a guid
>
> <https://github.com/ansible/ansible-modules-extras/blob/devel/windows/win_package.ps1#L192>
>
> and sets the $identifyingNumber to the product_id.
> - Get-ProductEntry then takes the parsed $identifyingNumber form
> Validate-StandardArguments and returns the $keyLocation for the product_id
> (either 32bit or 64bit uninstall registry keys)
> - Set-TargetResource then tests the resource, notices that the installer
> is an exe
>
> <https://github.com/ansible/ansible-modules-extras/blob/devel/windows/win_package.ps1#L810>
>
> and starts the process as requested by the supplied arguments. After
> install the function should then check if the $Ensure state is set to
> 'Present' (default condition), then it checks to see if the value returned
> from Get-ProductEntry exists (program was installed.
>
> Unfortunately, it fails to install the exe. I did notice that the process
> briefly appears in the task manager, then immediately following the failure
> notice from ansible, drops away. Perhaps the process fails
> <https://github.com/ansible/ansible-modules-extras/blob/devel/windows/win_package.ps1#L840>
>
> to correctly start with the correct arguments?
>
--
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/6c00962c-2e84-41b4-a64f-69e72bbdb919%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.