From 2ca7c550390f5978d1dab3c78a1b84fe073f8ed0 Mon Sep 17 00:00:00 2001 From: Jiri Stransky Date: Mon, 24 Jun 2019 12:32:30 +0200 Subject: [PATCH] Allow skipping RHSM with Leapp Useful when developing and testing. Also, we don't need to be explicitly installing RHSM, instead we should ensure that it doesn't get removed by accident if it needs to be present. Change-Id: I65ccf3436bf3816b52c40a7e154511ab3a2e43be Partial-Bug: #1831690 --- .../tripleo-packages-baremetal-puppet.yaml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/deployment/tripleo-packages/tripleo-packages-baremetal-puppet.yaml b/deployment/tripleo-packages/tripleo-packages-baremetal-puppet.yaml index 249c1cdb80..28367d4d82 100644 --- a/deployment/tripleo-packages/tripleo-packages-baremetal-puppet.yaml +++ b/deployment/tripleo-packages/tripleo-packages-baremetal-puppet.yaml @@ -59,6 +59,10 @@ parameters: description: Print debugging output when running Leapp type: boolean default: true + UpgradeLeappDevelSkipRhsm: + description: Skip RHSM when running Leapp in development/testing. + type: boolean + default: false UpgradeLeappRebootTimeout: description: Timeout (seconds) for the OS upgrade phase via Leapp type: number @@ -93,6 +97,7 @@ outputs: set_fact: upgrade_leapp_enabled: {get_param: UpgradeLeappEnabled} upgrade_leapp_debug: {get_param: UpgradeLeappDebug} + upgrade_leapp_devel_skip_rhsm: {get_param: UpgradeLeappDevelSkipRhsm} upgrade_leapp_reboot_timeout: {get_param: UpgradeLeappRebootTimeout} - name: system_upgrade_prepare step 3 tags: @@ -111,17 +116,16 @@ outputs: -python2-markupsafe \ -python2-six when: upgrade_leapp_enabled - - name: install leapp and required packages which may have been removed previously + - name: install leapp package: - name: "{{item}}" + name: leapp state: latest - loop: - - leapp - - subscription-manager when: upgrade_leapp_enabled - name: run leapp upgrade (download packages) - shell: | - leapp upgrade {{ '--debug' if upgrade_leapp_debug|default(true) else '' }} + shell: > + {% if upgrade_leapp_devel_skip_rhsm|default(false) %}LEAPP_DEVEL_SKIP_RHSM=1{% endif %} + leapp upgrade + {% if upgrade_leapp_debug|default(true) %}--debug{% endif %} when: upgrade_leapp_enabled - name: system_upgrade_run step 5 tags: