FAQ
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.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 3 | next ›
Discussion Overview
grouppuppet-users @
categoriespuppet
postedJul 4, '13 at 7:09p
activeJul 31, '13 at 2:16p
posts3
users3
websitepuppetlabs.com

3 users in discussion

Rob Reynolds: 1 post Cko: 1 post Dan White: 1 post

People

Translate

site design / logo © 2021 Grokbase