I've got a situation where I need to remove a set of packages and then install the upgraded versions. I can't just upgrade. It's rare that I have to upgrade the software but I'd like to have something in place to upgrade when I have to. What's the best way to handle these types of situations with Puppet?
Is there anyway to force $purge_pkgs to run and then have $install_pkgs run after on the same run? As written below, I think what happens is the packages are uninstalled but when the compile runs, $install_pkgs are already installed, so it does nothing.
Class upgrade:
-----------------------------------------
if $upg == 'yes' {
package { $purge_pkgs:
ensure => 'purged',
install_options => '-y',
}
}
package { $install_pkgs:
ensure => installed,
install_options => '-y',
}
Bunch of other bits run.........
------------------------------------------
Any advice appreciated.
Thanks,