Katello/katello

View on GitHub
app/views/foreman/job_templates/restart_services.erb

Summary

Maintainability
Test Coverage
<%#
kind: job_template
name: Restart Services - Katello Script Default
job_category: Katello
description_format: 'Restart Services'
feature: katello_service_restart
provider_type: script
template_inputs:
- name: helper
  description: A comma separated list of commands to run to restart services
  input_type: user
  required: true
%>

<%
commands = input(:helper).split(',').map { |split| split.strip }
reboot = commands.delete('reboot')
-%>
<%= commands.join("\n") %>
katello-tracer-upload
<% if reboot -%>
<%= render_template('Power Action - Script Default', action: 'restart') %>
<% end %>