Hello all,
In building out an initial workstation configuration (Ubuntu 10.04 lucid)
via Puppet, I have the need to do two things in order. The first is to do
a dist-upgrade on the workstation and reboot, followed by an install of a
Nvida driver. Upon doing a dist-upgrade, I have to reboot the machine in
order for the workstation to start using the new linux-headers because if I
install the Nvidia drivers without doing a reboot after a dist-upgrade, the
drivers will compile against the old headers and my gui no longer works and
X won't start because of a modprobe issue.
With that said, I've written the dist-upgrade manifest as so:
class dist_upgrade {
exec { "dist_upgrade" :
command => "/usr/bin/apt-get -y dist-upgrade" ,
}
exec { "purge_linux-headers-2.6.32-38" :
command => "/usr/bin/apt-get -y purge
linux-headers-2.6.32-38" ,
require => Exec['dist_upgrade'] ,
}
exec { "purge_linux-image-2.6.32-38-server" :
command => "/usr/bin/apt-get -y purge
linux-image-2.6.32-38-server" ,
require => Exec['purge_linux-headers-2.6.32-38'] ,
}
#This is done so the system starts using the new headers/image
exec { "reboot_after_dist_upgrade" :
command => "/sbin/reboot" ,
subscribe => Exec["purge_linux-image-2.6.32-38-server"] ,
refreshonly => true ,
}
}
This seems to be doing the job but I feel it's a bit of a hack and I was
wondering if anybody had an opinion as to if this can be done in a cleaner
fashion. I'm still very new to Puppet so please excuse my novice example.
Thanks in advance for the help and support.
Cheers,
Mike
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/puppet-users/-/R5BQkgRvyt4J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.