Sha256: c764ab213f5d740b9bafed525287b56ca5948de9f5f7673317d11ff8182ef1b7

Contents?: true

Size: 846 Bytes

Versions: 62

Compression:

Stored size: 846 Bytes

Contents

<%#
kind: job_template
name: Service Action - Script Default
model: JobTemplate
job_category: Services
description_format: '%{action} service %{service}'
provider_type: script
template_inputs:
- name: action
  description: Action to perform on the service
  input_type: user
  options: "restart\nstart\nstop\nstatus\nreload\nenable\ndisable"
  required: true
- name: service
  description: Name of the service
  input_type: user
  required: true
%>
<% if @host.operatingsystem.family == "Redhat" && @host.operatingsystem.major.to_i > 6 %>
systemctl <%= input("action") %> <%= input("service") %>
<% else %>
  <% case input("action")
  when 'enable' %>
chkconfig --add <%= input("service") %>
  <% when 'disable' %>
chkconfig --del <%= input("service") %>
  <% else %>
service <%= input("service") %> <%= input("action") %>
  <% end %>
<% end -%>

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
foreman_remote_execution-10.0.3 app/views/templates/script/service_action.erb
foreman_remote_execution-10.0.2 app/views/templates/script/service_action.erb
foreman_remote_execution-10.0.1 app/views/templates/script/service_action.erb
foreman_remote_execution-10.0.0 app/views/templates/script/service_action.erb
foreman_remote_execution-8.3.0 app/views/templates/script/service_action.erb
foreman_remote_execution-9.1.0 app/views/templates/script/service_action.erb
foreman_remote_execution-8.2.1 app/views/templates/script/service_action.erb
foreman_remote_execution-8.2.0 app/views/templates/script/service_action.erb
foreman_remote_execution-9.0.1 app/views/templates/script/service_action.erb
foreman_remote_execution-9.0.0 app/views/templates/script/service_action.erb
foreman_remote_execution-8.1.2 app/views/templates/script/service_action.erb
foreman_remote_execution-8.1.1 app/views/templates/script/service_action.erb
foreman_remote_execution-8.1.0 app/views/templates/script/service_action.erb
foreman_remote_execution-7.2.2 app/views/templates/script/service_action.erb
foreman_remote_execution-7.2.1 app/views/templates/script/service_action.erb
foreman_remote_execution-7.2.0 app/views/templates/script/service_action.erb
foreman_remote_execution-8.0.0 app/views/templates/script/service_action.erb
foreman_remote_execution-7.1.1 app/views/templates/script/service_action.erb
foreman_remote_execution-7.1.0 app/views/templates/script/service_action.erb
foreman_remote_execution-7.0.0 app/views/templates/script/service_action.erb