Update ansible before the ansible upgrade tasks
authorMarius Cornea <mcornea@redhat.com>
Wed, 1 Nov 2017 16:08:31 +0000 (17:08 +0100)
committerMarius Cornea <mcornea@redhat.com>
Mon, 13 Nov 2017 13:29:36 +0000 (13:29 +0000)
In case an ansible update is available during the upgrade then
the ansible package gets updated to a new version by the ansible
tasks. This could potentially lead to issues as the one described
in LP#1729546. This change updates the ansible package via yum
before starting the ansible upgrade tasks in order to avoid having
ansible updating itself.

Related-bug: 1729546

Change-Id: I2ea0aa1f670053578996018663c9fa52dec14b77
(cherry picked from commit 0c1ac1d752aaf88832b34e165f7d147e2304ff1c)

environments/major-upgrade-composable-steps-docker.yaml
environments/major-upgrade-composable-steps.yaml

index 1f45d02..f854ee8 100644 (file)
@@ -8,6 +8,7 @@ parameter_defaults:
     #!/bin/bash
     set -eu
     # Ocata to Pike, put any needed host-level workarounds here
+    yum update -y ansible
     yum install -y ansible-pacemaker
   MigrationSshPort: 22
-  UpgradeRemoveUnusedPackages: false
\ No newline at end of file
+  UpgradeRemoveUnusedPackages: false
index e8a0074..0dbb6cd 100644 (file)
@@ -10,9 +10,10 @@ parameter_defaults:
     # install ansible heat agents and ansible-pacemaker
     set -eu
     yum install -y python-heat-agent-*
+    yum update -y ansible
     yum install -y ansible-pacemaker
     rm -f /usr/libexec/os-apply-config/templates/etc/puppet/hiera.yaml
     rm -f /usr/libexec/os-refresh-config/configure.d/40-hiera-datafiles
     rm -f /etc/puppet/hieradata/*.yaml
   MigrationSshPort: 22
-  UpgradeRemoveUnusedPackages: false
\ No newline at end of file
+  UpgradeRemoveUnusedPackages: false