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