cko
2013-Jul-04 19:09 UTC
[Puppet Users] updating puppet with puppet on windows node (msi)
hi, im trying to update the puppet windows agent on my windows server 2008
r2 node.
i installed puppet-3.2.2 manually. my goal is to update the puppet agent to
puppet-3.2.3-rc1
i tried that with the following manifest:
*init.pp:*
class base_puppet_agent {
include base_puppet_agent::install,
base_puppet_agent::service,
base_puppet_agent::config
}
*install.pp:*
class base_puppet_agent::install {
case $::operatingsystem {
windows : {
package { ''PuppetWindows'':
name => ''Puppet'',
ensure => installed,
source =>
''puppet:\\\modules\base_puppet_agent\puppet-3.2.3-rc1.msi'',
provider => windows
}
}
centos, redhat: {
package { ''puppet'':
ensure => installed,
}
}
}
}
*service.pp:*
class base_puppet_agent::service {
service { ''puppet'':
ensure => running,
enable => true,
hasstatus => true,
hasrestart => true
}
}
*config.pp:*
class base_puppet_agent::config {
case $::operatingsystem {
windows: {
#Windows
file {
''C:\ProgramData\PuppetLabs\puppet\etc\puppet.conf'':
source =>
"puppet:///modules/base_puppet_agent/puppet_windows.conf",
notify => Service[''puppet''],
require => Package [''PuppetWindows'']
}
}
centos, redhat: {
#Linux
file { ''/etc/puppet/puppet.conf'':
source =>
"puppet:///modules/base_puppet_agent/puppet.conf",
owner => ''root'',
group => ''root'',
mode => ''0644'',
notify => Service[''puppet''],
require => Package [''puppet'']
}
}
}
}
the puppet run works perfectly. no errors whatsoever. the problem is, that
it doesn''t update to the desired version. it just checks, if a package
named "puppet" is installed, but ignores the current version.
thoughts?
--
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+unsubscribe@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.
Dan White
2013-Jul-04 22:17 UTC
Re: [Puppet Users] updating puppet with puppet on windows node (msi)
On Linux, you would do this:
install.pp:
class base_puppet_agent::install {
case $::operatingsystem {
windows : {
package { ''PuppetWindows'':
name => ''Puppet'',
ensure => installed,
source =>
''puppet:\\\modules\base_puppet_agent\puppet-3.2.3-rc1.msi'',
provider => windows
}
}
centos, redhat: {
package { ''puppet'':
ensure => latest, # <--------
}
}
}
}
And the Linux package provider would know when a new version is available. I am
not sure if Windows can do that.
From http://docs.puppetlabs.com/references/3.2.latest/type.html#package, it
says:
ensure
What state the package should be in. On packaging systems that can retrieve new
packages on their own, you can choose which package to retrieve by specifying a
version number or latest as the ensure value. On packaging systems that manage
configuration files separately from “normal” system files, you can uninstall
config files by specifying purged as the ensure value. Valid values are present
(also calledinstalled), absent, purged, held, latest. Values can match /./.
You might find these links of help:
http://docs.puppetlabs.com/windows/writing.html#packagepackage
http://docs.puppetlabs.com/windows/troubleshooting.html#package
On Jul 4, 2013, at 3:09 PM, cko wrote:
> hi, im trying to update the puppet windows agent on my windows server 2008
r2 node.
>
> i installed puppet-3.2.2 manually. my goal is to update the puppet agent to
puppet-3.2.3-rc1
>
> i tried that with the following manifest:
>
> init.pp:
>
> class base_puppet_agent {
> include base_puppet_agent::install,
> base_puppet_agent::service,
> base_puppet_agent::config
> }
>
> install.pp:
>
> class base_puppet_agent::install {
> case $::operatingsystem {
> windows : {
> package { ''PuppetWindows'':
> name => ''Puppet'',
> ensure => installed,
> source =>
''puppet:\\\modules\base_puppet_agent\puppet-3.2.3-rc1.msi'',
> provider => windows
> }
> }
> centos, redhat: {
> package { ''puppet'':
> ensure => installed,
> }
> }
> }
> }
>
> service.pp:
>
> class base_puppet_agent::service {
> service { ''puppet'':
> ensure => running,
> enable => true,
> hasstatus => true,
> hasrestart => true
> }
> }
>
> config.pp:
>
> class base_puppet_agent::config {
>
> case $::operatingsystem {
> windows: {
> #Windows
> file {
''C:\ProgramData\PuppetLabs\puppet\etc\puppet.conf'':
> source =>
"puppet:///modules/base_puppet_agent/puppet_windows.conf",
> notify => Service[''puppet''],
> require => Package [''PuppetWindows'']
> }
> }
> centos, redhat: {
> #Linux
> file { ''/etc/puppet/puppet.conf'':
> source =>
"puppet:///modules/base_puppet_agent/puppet.conf",
> owner => ''root'',
> group => ''root'',
> mode => ''0644'',
> notify => Service[''puppet''],
> require => Package [''puppet'']
> }
> }
> }
> }
>
> the puppet run works perfectly. no errors whatsoever. the problem is, that
it doesn''t update to the desired version. it just checks, if a package
named "puppet" is installed, but ignores the current version.
>
> thoughts?
>
>
> --
> 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+unsubscribe@googlegroups.com.
> To post to this group, send email to puppet-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
--
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+unsubscribe@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.
Rob Reynolds
2013-Jul-31 14:16 UTC
Re: [Puppet Users] updating puppet with puppet on windows node (msi)
The windows package provider doesn''t have this information. You could alternatively try the chocolatey package provider. It''s available on the forge: http://forge.puppetlabs.com/rismoney/chocolatey -- Rob Reynolds Developer, Puppet Labs *Join us at PuppetConf 2013, August 22-23 in San Francisco - * http://bit.ly/pupconf13* **Register now and take advantage of the Final Countdown discount - save 15%!* On Thu, Jul 4, 2013 at 5:17 PM, Dan White <ygor@comcast.net> wrote:> On Linux, you would do this: > > install.pp: > > class base_puppet_agent::install { > case $::operatingsystem { > windows : { > package { ''PuppetWindows'': > name => ''Puppet'', > ensure => installed, > source => > ''puppet:\\\modules\base_puppet_agent\puppet-3.2.3-rc1.msi'', > provider => windows > } > } > centos, redhat: { > package { ''puppet'': > ensure => latest, # <-------- > } > } > } > } > > And the Linux package provider would know when a new version is available. > I am not sure if Windows can do that. > > From http://docs.puppetlabs.com/references/3.2.latest/type.html#package, > it says: > > ensure > What state the package should be in. On packaging systems that can > retrieve new packages on their own, you can choose which package to > retrieve by specifying a version number or latest as the ensure value. On > packaging systems that manage configuration files separately from “normal” > system files, you can uninstall config files by specifying purged as the > ensure value. Valid values are present (also > calledinstalled), absent, purged, held, latest. Values can match /./. > > > You might find these links of help: > > http://docs.puppetlabs.com/windows/writing.html#packagepackage > http://docs.puppetlabs.com/windows/troubleshooting.html#package > > On Jul 4, 2013, at 3:09 PM, cko wrote: > > hi, im trying to update the puppet windows agent on my windows server 2008 > r2 node. > > i installed puppet-3.2.2 manually. my goal is to update the puppet agent > to puppet-3.2.3-rc1 > > i tried that with the following manifest: > > init.pp: > > class base_puppet_agent { > include base_puppet_agent::install, > base_puppet_agent::service, > base_puppet_agent::config > } > > install.pp: > > class base_puppet_agent::install { > case $::operatingsystem { > windows : { > package { ''PuppetWindows'': > name => ''Puppet'', > ensure => installed, > source => > ''puppet:\\\modules\base_puppet_agent\puppet-3.2.3-rc1.msi'', > provider => windows > } > } > centos, redhat: { > package { ''puppet'': > ensure => installed, > } > } > } > } > > service.pp: > > class base_puppet_agent::service { > service { ''puppet'': > ensure => running, > enable => true, > hasstatus => true, > hasrestart => true > } > } > > config.pp: > > class base_puppet_agent::config { > > case $::operatingsystem { > windows: { > #Windows > file { ''C:\ProgramData\PuppetLabs\puppet\etc\puppet.conf'': > source => " > puppet:///modules/base_puppet_agent/puppet_windows.conf", > notify => Service[''puppet''], > require => Package [''PuppetWindows''] > } > } > centos, redhat: { > #Linux > file { ''/etc/puppet/puppet.conf'': > source => "puppet:///modules/base_puppet_agent/puppet.conf", > owner => ''root'', > group => ''root'', > mode => ''0644'', > notify => Service[''puppet''], > require => Package [''puppet''] > } > } > } > } > > the puppet run works perfectly. no errors whatsoever. the problem is, that > it doesn''t update to the desired version. it just checks, if a package > named "puppet" is installed, but ignores the current version. > > thoughts? > > > -- > 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+unsubscribe@googlegroups.com. > To post to this group, send email to puppet-users@googlegroups.com. > Visit this group at http://groups.google.com/group/puppet-users. > For more options, visit https://groups.google.com/groups/opt_out. > > > > > -- > 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+unsubscribe@googlegroups.com. > To post to this group, send email to puppet-users@googlegroups.com. > Visit this group at http://groups.google.com/group/puppet-users. > For more options, visit https://groups.google.com/groups/opt_out. > > >-- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.