From 9a242b37940a7cba3ea58027be2297ddfe2efa7e Mon Sep 17 00:00:00 2001 From: Leos Stejskal Date: Wed, 11 Dec 2024 10:04:20 +0100 Subject: [PATCH] Fixes #38094 - Support --els switch in convert2rhel --- .../templates/script/convert2rhel_analyze.erb | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/app/views/templates/script/convert2rhel_analyze.erb b/app/views/templates/script/convert2rhel_analyze.erb index 6aba650b8..37b8ef842 100644 --- a/app/views/templates/script/convert2rhel_analyze.erb +++ b/app/views/templates/script/convert2rhel_analyze.erb @@ -5,7 +5,20 @@ model: JobTemplate job_category: Convert 2 RHEL provider_type: script kind: job_template +template_inputs: +- name: ELS + required: true + input_type: user + description: Use an Extended Lifecycle Support (ELS) add-on subscription + advanced: false + value_type: plain + options: "true\nfalse" + default: "true" + hidden_value: false %> +<%- + els = input('ELS') == "true" ? "--els" : "" +-%> <% if @host.operatingsystem.family == 'Redhat' -%> if ! [ $(id -u) -eq 0 ]; then echo "You must run convert2rhel as a root user." @@ -18,7 +31,7 @@ fi export CONVERT2RHEL_THROUGH_FOREMAN=1 -/usr/bin/convert2rhel analyze -y +/usr/bin/convert2rhel analyze -y <%= els %> # Workaround for https://issues.redhat.com/browse/RHELC-1280 subscription-manager facts --update