Ensure package updates don't happen unexpectedly
authorSteven Hardy <shardy@redhat.com>
Thu, 22 Dec 2016 16:42:12 +0000 (16:42 +0000)
committerSteven Hardy <shardy@redhat.com>
Thu, 22 Dec 2016 16:42:12 +0000 (16:42 +0000)
I'm seeing this run yum update on deploy, even though hiera
tripleo::packages::enable_upgrade says false.

I assume these are needed because we're getting "false", but I'm
unclear if this is a recently introduced problem (I only noticed it
today as my image has outdated centos packages and it thus hung on
step2 of the deploy.

Change-Id: If09cdde9883f2674dbbc40944be5fe4445caa08e
Closes-Bug: #1652107

manifests/packages.pp

index ec2635a..147c76a 100644 (file)
@@ -35,7 +35,7 @@ class tripleo::packages (
   # required for stages
   include ::stdlib
 
-  if !$enable_install and !$enable_upgrade {
+  if !str2bool($enable_install) and !str2bool($enable_upgrade) {
     case $::osfamily {
       'RedHat': {
         Package <| |> { provider => 'norpm' }
@@ -46,7 +46,7 @@ class tripleo::packages (
     }
   }
 
-  if $enable_upgrade {
+  if str2bool($enable_upgrade) {
     Package <| |> { ensure => 'latest' }
     # Running the package upgrade before managing Services in the main stage.
     # So we're sure that services will be able to restart with the new version