On Tue, Jan 14, 2014 at 10:22 AM, Mike Gaboury <mike.gabo...@gmail.com>wrote:

> That helped.  Thanks.  The key was to have the version in the title.  I
> had 'Puppet' and needed 'Puppet 3.4.2'.
>

This works because when puppet is installed, its DisplayName property in
the registry is "Puppet". So when you specify "Puppet 3.4.2", puppet will
determine that there is no such package installed. It will then install the
package from the specified source parameter, and in the process upgrade
puppet, as they share the same UpgradeCode.


>
> So this appears to be an inconsistency or, more likely, a lack of
> understanding on Windows packages and versioning (I'm a Linux guy).  I have
> a module to deploy Java.  To get that to work, I had to have 'Java 7 Update
> 45' in the title which corresponds to the Name field in the Control Panel
> Uninstall dialog.  However, Puppet's entry just has 'Puppet' in the Name
> field.  Using just 'Puppet' in the package definition would not trigger the
> install/upgrade.  What is the proper method for this in Windows?
>

Prior to 3.4, puppet could only ensure that a package with a given name was
installed or absent. To ensure that a particular version of a package was
installed, you could use the PackageCode (from the MSI). Search the
puppet-users list for information about that.

In 3.4 and up, the puppet windows package provider is "versionable"[1] This
means you can tell puppet to install a particular version, e.g.

package { "Puppet":
  ensure => "3.4.2",
  source => 'https://downloads.puppetlabs.com/windows/puppet-3.4.2.msi'
}

Of course, you will need to update puppet to at least 3.4 to be able to use
this feature.

Another option is to use the chocolatey package provider[2], which is both
versionable and upgradeable (so you can say ensure => latest).


> On Tuesday, January 14, 2014 9:38:55 AM UTC-6, Klavs Klavsen wrote:
>>
>> I use:
>> if ( $puppetversion != "3.3.1" ) {
>>   package { "Puppet 3.3.1":
>>      source =>  "\\\\software01\\autorepo\$\\Puppet\\puppet-3.3.1.msi",
>>      install_options => [ '/quiet', '/norestart','PUPPET_MASTER_SERVER=
>> puppet.example.dk']
>>   }
>> }
>>
>> to ensure a specific version on all windows hosts.
>>
>>  --
> 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 puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/1b781bd3-ad74-403f-858d-a8fbeaec5cd1%40googlegroups.com
> .
>
> For more options, visit https://groups.google.com/groups/opt_out.
>

Josh

[1] http://projects.puppetlabs.com/issues/21133
[2] https://github.com/chocolatey/puppet-chocolatey

-- 
Josh Cooper
Developer, Puppet Labs

*Join us at PuppetConf 2014, September 23-24 in San Francisco* -
http://bit.ly/pupconf14
Register now and save 40%! Offer expires January 31st.

-- 
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 puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CA%2Bu97umxrogGPndH4SZXFCsDcoPPzgLUWdSAmoQj2mY58u8-%3Dw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to