Also this feature just came out with 3.4.0 - see
https://tickets.puppetlabs.com/browse/PUP-272

Note that there is some upcoming work with the Windows Package Provider -
https://tickets.puppetlabs.com/browse/PUP-393 , notably you may want to
explore https://tickets.puppetlabs.com/browse/PUP-400 (and the linked
redmine issue).


On Tue, May 27, 2014 at 11:33 AM, Rob Reynolds <[email protected]> wrote:

>
>
>
> On Tue, May 27, 2014 at 5:55 AM, Tomer Paz <[email protected]> wrote:
>
>> Hi.
>> I have an issue with puppet package resource not verifying Version well
>> for MSI packages on windows.
>> I tried both puppet 3.4 and latest 3.6, the matters remains the same.
>> When using
>>   ensure => "installed"
>> it works fine and puppet skip running the msiexec /i...
>>
>> I made sure I am using MSI DisplayVersion (double verified with
>> add/remove programs and using MS VB scripts and registry to check the
>> package DisplayVersion) including some very common globally distributed
>> MSIs and executables like MS products (VC2xxx for to name a few).
>> The behavior is: Puppet re-runs msiexec /i as if it is not found.
>> The expected behavior: Puppet to skip installation by verifying version
>> equals.
>>
>> Only one exception note, I have also in-house created MSIs which are Not
>> registered to add/remove programs list (ARPSYSTEMCOMPONENT=1) but I don't
>> think that matters either (as also MS MSIs/Execs are not checked by version
>> correctly).
>>
>
>
> If you run puppet resource package and your packages do not show up, then
> it is not going to work with puppet. You should probably register them to
> the add/remove programs to see if that fixes things before trying to opt it
> out. I'm guessing this one thing is likely causing your behavior. The issue
> you are seeing with others is likely due to what I've covered in the next
> section.
>
>
>>
>> Here is a sample of how my package resource looks like, including hiera
>> configuration:
>>
>> class framework_app_server_env::install () inherits framework_app_server {
>>     $gavarr = split($gav, ':')
>>
>> *    $version = $gavarr[2]*
>>     artifactory::artifact { 'FrameworkAppServerEnvironment.msi':
>>         gav        => "${gav}",
>>         ensure     => present,
>>         packaging  => 'msi',
>>         repository => "${artifactory_repo}",
>>         output     =>
>> "${install_dir}\\FrameworkAppServerEnvironment-${version}.msi",
>>         require    => Class['artifactory']
>>     }
>>
>>     package { 'Framework App Server Environment':
>>
>
> The package name must mach *exactly* with what you get back from calling
> 'puppet resource package', including any versions in the name. See
> http://docs.puppetlabs.com/windows/writing.html#packagepackage for more
> details.
>
>
>>
>> *        ensure           => "${version}", *        source            =>
>> "${install_dir}\\FrameworkAppServerEnvironment-${version}.msi",
>>         install_options => [ 'ARPSYSTEMCOMPONENT=1',
>> "INSTALLDIR=${software_dir}", '/log',
>> "${log_dir}\\framework_app_server_env.log" ],
>>         require            => [
>> Artifactory::Artifact['FrameworkAppServerEnvironment.msi'],
>> File["${install_dir}"], File["${software_dir}"] ]
>>     }
>> }
>>
>> and in hiera file:
>> framework_app_server_env::artifact::gav :
>> 'shared-components:FrameworkAppServerEnvironment:*11.2.0.0186*'
>>
>> I tried using notify to print ${version} while running agent -t on the
>> agent windows machine and it printed the version perfectly.
>>
>> Puzzled.
>>
>> Tom
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Puppet Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/puppet-users/ae6edc0b-6f50-42d1-bdc1-b16eca147534%40googlegroups.com<https://groups.google.com/d/msgid/puppet-users/ae6edc0b-6f50-42d1-bdc1-b16eca147534%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Rob Reynolds
> Developer, Puppet Labs
>
> *Join us at **PuppetConf 2014 <http://puppetconf.com>**, September
> 23-24 in San Francisco*
> *Register by May 30th to take advantage of the Early Adopter discount
> <http://links.puppetlabs.com/puppetconf-early-adopter> **--**save $349!*
>



-- 
Rob Reynolds
Developer, Puppet Labs

*Join us at **PuppetConf 2014 <http://puppetconf.com>**, September 23-24 in
San Francisco*
*Register by May 30th to take advantage of the Early Adopter discount
<http://links.puppetlabs.com/puppetconf-early-adopter> **--**save $349!*

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAMJiBK5ffxz8LQ53Oh8WNPb3g%3Dhi-K1LaaxQ5kzwjT7v0iaAeQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to