diff options
author | 2016-01-07 14:15:51 +0000 | |
---|---|---|
committer | 2016-01-07 14:15:52 +0000 | |
commit | bd12196e5bd9bfd56914591d2025c56fc4999ba3 (patch) | |
tree | b6918645a2fae2c4ce0302a99641366634e2e80d /manifests | |
parent | 8a0c4b82bba33361853091bcbdef9f4eb4d940bf (diff) | |
parent | 62e74d9663bdedf50cb77db5cfc843fc940149bc (diff) |
Merge "Upgrade all packages after puppet managed ones"
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/packages.pp | 21 |
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 <| |> + } } - |