I wanted to use puppet to update my kernel.  Afterwards I wanted to
reboot the computer.   I'm using centos5.5.

Googling around I came up with this:

  exec { rebootDueToPackageUpdates:
    command => "/sbin/reboot",
    refreshonly => "true"
  }
  package { "kernel":
    ensure => "2.6.18-194.17.4.el5",
    notify => Exec[rebootDueToPackageUpdates]
  }

When it runs I see an error, even though the new version is
installed.  Because the old version still exists (I'm guessing), it
determines it failed:

.../Package[kernel]/ensure) change from 2.6.18-194.el5 to
2.6.18-194.17.4.el5 failed: Could not update: Failed to update to
version 2.6.18-194.17.4.el5, got version 2.6.18-194.el5 instead at ...

# rpm -qa | grep kernel
kernel-2.6.18-194.el5
kernel-2.6.18-194.17.4.el5

I can only assume the package type doesn't deal with the special case
of the 'kernel' package always doing an install rather than an
update.  This may be a rpm/redhat/centos specific thing...

Is my assessment wrong?  Anybody got ideas how to do this maybe w/o
package?  Do I really have to resort to an exec onlyif test for
missing version?  Seems messy...  Seems like something the rpm
provider for package should handle as any rpm install of 'kernel' is
always an install and not an update.

Thanks,
Steve

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to