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
This commit is contained in:
Jiri Stransky 2019-06-24 12:32:30 +02:00
parent b546b425f9
commit 2ca7c55039

View File

@ -59,6 +59,10 @@ parameters:
description: Print debugging output when running Leapp description: Print debugging output when running Leapp
type: boolean type: boolean
default: true default: true
UpgradeLeappDevelSkipRhsm:
description: Skip RHSM when running Leapp in development/testing.
type: boolean
default: false
UpgradeLeappRebootTimeout: UpgradeLeappRebootTimeout:
description: Timeout (seconds) for the OS upgrade phase via Leapp description: Timeout (seconds) for the OS upgrade phase via Leapp
type: number type: number
@ -93,6 +97,7 @@ outputs:
set_fact: set_fact:
upgrade_leapp_enabled: {get_param: UpgradeLeappEnabled} upgrade_leapp_enabled: {get_param: UpgradeLeappEnabled}
upgrade_leapp_debug: {get_param: UpgradeLeappDebug} upgrade_leapp_debug: {get_param: UpgradeLeappDebug}
upgrade_leapp_devel_skip_rhsm: {get_param: UpgradeLeappDevelSkipRhsm}
upgrade_leapp_reboot_timeout: {get_param: UpgradeLeappRebootTimeout} upgrade_leapp_reboot_timeout: {get_param: UpgradeLeappRebootTimeout}
- name: system_upgrade_prepare step 3 - name: system_upgrade_prepare step 3
tags: tags:
@ -111,17 +116,16 @@ outputs:
-python2-markupsafe \ -python2-markupsafe \
-python2-six -python2-six
when: upgrade_leapp_enabled when: upgrade_leapp_enabled
- name: install leapp and required packages which may have been removed previously - name: install leapp
package: package:
name: "{{item}}" name: leapp
state: latest state: latest
loop:
- leapp
- subscription-manager
when: upgrade_leapp_enabled when: upgrade_leapp_enabled
- name: run leapp upgrade (download packages) - name: run leapp upgrade (download packages)
shell: | shell: >
leapp upgrade {{ '--debug' if upgrade_leapp_debug|default(true) else '' }} {% 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 when: upgrade_leapp_enabled
- name: system_upgrade_run step 5 - name: system_upgrade_run step 5
tags: tags: