Sha256: c764ab213f5d740b9bafed525287b56ca5948de9f5f7673317d11ff8182ef1b7

Contents?: true

Size: 846 Bytes

Versions: 57

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

57 entries across 57 versions & 1 rubygems

Version Path
foreman_remote_execution-14.1.2 app/views/templates/script/service_action.erb
foreman_remote_execution-14.1.1 app/views/templates/script/service_action.erb
foreman_remote_execution-14.1.0 app/views/templates/script/service_action.erb
foreman_remote_execution-14.0.2 app/views/templates/script/service_action.erb
foreman_remote_execution-14.0.1 app/views/templates/script/service_action.erb
foreman_remote_execution-13.2.6 app/views/templates/script/service_action.erb
foreman_remote_execution-14.0.0 app/views/templates/script/service_action.erb
foreman_remote_execution-13.2.5 app/views/templates/script/service_action.erb
foreman_remote_execution-13.2.4 app/views/templates/script/service_action.erb
foreman_remote_execution-13.2.3 app/views/templates/script/service_action.erb
foreman_remote_execution-13.2.2 app/views/templates/script/service_action.erb
foreman_remote_execution-12.0.7 app/views/templates/script/service_action.erb
foreman_remote_execution-13.2.1 app/views/templates/script/service_action.erb
foreman_remote_execution-13.2.0 app/views/templates/script/service_action.erb
foreman_remote_execution-10.1.3 app/views/templates/script/service_action.erb
foreman_remote_execution-13.0.0 app/views/templates/script/service_action.erb
foreman_remote_execution-12.0.5 app/views/templates/script/service_action.erb
foreman_remote_execution-12.0.4 app/views/templates/script/service_action.erb
foreman_remote_execution-12.0.1 app/views/templates/script/service_action.erb
foreman_remote_execution-12.0.2 app/views/templates/script/service_action.erb