Skip to content

Commit

Permalink
ELS option for convert2rhel
Browse files Browse the repository at this point in the history
  • Loading branch information
stejskalleos committed Dec 10, 2024
1 parent 4bd8c2b commit e2a517b
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 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,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:
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e2a517b

Please sign in to comment.