aboutsummaryrefslogtreecommitdiffstats
path: root/manifests/packages.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/packages.pp')
-rw-r--r--manifests/packages.pp21
1 files changed, 20 insertions, 1 deletions
diff --git a/manifests/packages.pp b/manifests/packages.pp
index ac11efd..c0971e9 100644
--- a/manifests/packages.pp
+++ b/manifests/packages.pp
@@ -45,7 +45,26 @@ class tripleo::packages (
if $enable_upgrade {
Package <| |> { ensure => 'latest' }
+
+ case $::osfamily {
+ 'RedHat': {
+ $pkg_upgrade_cmd = 'yum -y update'
+ }
+ default: {
+ warning('Please specify a package upgrade command for distribution.')
+ }
+ }
+
+ exec { 'package-upgrade':
+ command => $pkg_upgrade_cmd,
+ path => '/usr/bin',
+ }
+ # A resource chain to ensure the upgrade ordering we want:
+ # 1) upgrade puppet managed packages (will trigger puppet dependencies)
+ # 2) then upgrade all packages via exec
+ # 3) then restart services
+ Package <| |> -> Exec['package-upgrade'] -> Service <| |>
+
}
}
-