Saltstack Official Linux Formula
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

service.sls 435B

12345678910111213141516
  1. {%- from "linux/map.jinja" import system with context %}
  2. {%- if system.enabled %}
  3. {%- for name, service in system.service.iteritems() %}
  4. linux_service_{{ name }}:
  5. service.{{ service.status }}:
  6. {%- if service.status == 'dead' %}
  7. - enable: {{ service.get('enabled', False) }}
  8. {%- elif service.status == 'running' %}
  9. - enable: {{ service.get('enabled', True) }}
  10. {%- endif %}
  11. - name: {{ name }}
  12. {%- endfor %}
  13. {%- endif %}