Skip to content

Commit

Permalink
Fixes #38093 - ELS option for the convert2rhel tool
Browse files Browse the repository at this point in the history
  • Loading branch information
stejskalleos committed Dec 20, 2024
1 parent 2f12ded commit 55077d1
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion app/views/foreman_ansible/job_templates/convert_to_rhel.erb
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,25 @@ template_inputs:
advanced: false
value_type: plain
hidden_value: false
- name: ELS
required: false
input_type: user
description: Use an Extended Lifecycle Support (ELS) add-on subscription
advanced: false
value_type: plain
options: "yes\r\nno"
default: "no"
hidden_value: false
model: JobTemplate
job_category: Convert 2 RHEL
provider_type: Ansible
kind: job_template
%>
<%-
ack = " --activationkey \"#{input_resource('Activation Key').name}\""
org = " --org \"#{@host.organization.label}\""
els = input('ELS') == "yes" ? " --els" : ""
-%>
---
- hosts: all
environment:
Expand Down Expand Up @@ -53,7 +67,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 <%= ack + org + els %>

<%- if input('Restart') == "yes" -%>
- name: Reboot the machine
Expand Down

0 comments on commit 55077d1

Please sign in to comment.