From e5e6b95bb29f3a06a9db1121dc50fb2dbb6e16a6 Mon Sep 17 00:00:00 2001 From: Daniel Bengtsson Date: Fri, 13 Dec 2019 16:28:47 +0100 Subject: [PATCH] Run update without yum update to apply hotfixes. Add a new option to skip the yum update of all packages. Change-Id: Idd22c7b4403bb63c06d2ba714d851a976e830108 (cherry picked from commit 4cc2b1196e2ac13de521b2fae0d1436a6f7d0d66) --- .../tripleo-packages-baremetal-puppet.yaml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/deployment/tripleo-packages/tripleo-packages-baremetal-puppet.yaml b/deployment/tripleo-packages/tripleo-packages-baremetal-puppet.yaml index ddca7df794..ff4e176dc1 100644 --- a/deployment/tripleo-packages/tripleo-packages-baremetal-puppet.yaml +++ b/deployment/tripleo-packages/tripleo-packages-baremetal-puppet.yaml @@ -83,6 +83,11 @@ parameters: major-upgrade-composable-steps.yaml and major-upgrade-converge.yaml environment files. default: '' + SkipPackageUpdate: + default: 'false' + description: Set to true to skip the update all packages + type: boolean + outputs: role_data: @@ -355,10 +360,15 @@ outputs: - step|int == 3 - os_net_config_need_upgrade.stdout - os_net_config_has_config.rc == 0 + - name: Set boolean skip_package_update + set_fact: + skip_package_update: {get_param: SkipPackageUpdate} # Exclude ansible until https://github.com/ansible/ansible/issues/56636 # is available - name: Update all packages - when: step|int == 3 + when: + - step|int == 3 + - not skip_package_update|bool yum: name: '*' state: latest @@ -386,10 +396,15 @@ outputs: - name: Exit if existing yum process fail: msg="ERROR existing yum.pid detected - can't continue! Please ensure there is no other package update process for the duration of the minor update worfklow. Exiting." when: (step|int == 0 or step|int == 3) and yum_pid_file.stat.exists + - name: Set boolean skip_package_update + set_fact: + skip_package_update: {get_param: SkipPackageUpdate} # Exclude ansible until https://github.com/ansible/ansible/issues/56636 # is available - name: Update all packages - when: step|int == 3 + when: + - step|int == 3 + - not skip_package_update|bool yum: name: '*' state: latest