0
0
mirror of https://github.com/saltstack-formulas/cron-formula.git synced 2024-11-28 03:27:50 +01:00
cron-formula/cron/service/running.sls
2019-08-28 03:12:18 +02:00

18 lines
430 B
Plaintext

# -*- coding: utf-8 -*-
# vim: ft=sls
{#- Get the `tplroot` from `tpldir` #}
{%- set tplroot = tpldir.split('/')[0] %}
{%- from tplroot ~ "/map.jinja" import cron with context %}
cron.service:
{%- if 'enabled' not in cron or ( 'enabled' in cron and cron.enabled ) %}
service.running:
- name: {{ cron.service }}
- enable: true
{%- else %}
service.dead:
- name: {{ cron.service }}
- enable: false
{%- endif %}