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 92d033d
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: 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
%>
<%-
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 92d033d

Please sign in to comment.