0
0
mirror of https://github.com/saltstack-formulas/cron-formula.git synced 2024-12-03 21:08:27 +01:00
cron-formula/cron/service.sls

16 lines
397 B
Plaintext
Raw Normal View History

2017-07-28 01:43:45 +02:00
# -*- coding: utf-8 -*-
# vim: ft=sls
{%- from "cron/map.jinja" import cron_settings with context %}
2017-07-28 01:43:45 +02:00
cron.service:
{%- if 'enabled' not in cron_settings or ( 'enabled' in cron_settings and cron_settings.enabled ) %}
service.running:
- name: {{ cron_settings.service }}
- enable: True
{%- else %}
service.dead:
- name: {{ cron_settings.service }}
- enable: False
{%- endif %}