From e2a517b04ae150bec0e6cbbb0f2f2eccfae8465b Mon Sep 17 00:00:00 2001 From: Leos Stejskal Date: Tue, 10 Dec 2024 16:46:32 +0100 Subject: [PATCH] ELS option for convert2rhel --- .../job_templates/convert_to_rhel.erb | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/app/views/foreman_ansible/job_templates/convert_to_rhel.erb b/app/views/foreman_ansible/job_templates/convert_to_rhel.erb index 51d7b64f..d9d13204 100644 --- a/app/views/foreman_ansible/job_templates/convert_to_rhel.erb +++ b/app/views/foreman_ansible/job_templates/convert_to_rhel.erb @@ -20,11 +20,23 @@ template_inputs: advanced: false value_type: plain hidden_value: false +- name: ELS + required: true + input_type: user + description: Explicitly recognize the system as els, utilizing els repos. + advanced: false + value_type: plain + options: "yes\r\nno" + default: "yes" + model: JobTemplate job_category: Convert 2 RHEL provider_type: Ansible kind: job_template %> +<%- + els = input('Restart') == "yes" ? " --els" : "" +-%> --- - hosts: all environment: @@ -53,7 +65,7 @@ kind: job_template - "convert2rhel_version is version('2.0.0', '<')" - name: Start convert2rhel - command: convert2rhel -y --activationkey "<%= input_resource('Activation Key').name %>" --org "<%= @host.organization.label %>" + command: convert2rhel -y --activationkey "<%= input_resource('Activation Key').name %>" --org "<%= @host.organization.label %>"<%= els %> <%- if input('Restart') == "yes" -%> - name: Reboot the machine