2017-07-28 01:43:45 +02:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
# vim: ft=sls
|
|
|
|
|
|
|
|
{% from "cron/map.jinja" import cron_settings with context %}
|
|
|
|
|
|
|
|
{% if 'tasks' in cron_settings %}
|
2019-03-30 23:57:23 +01:00
|
|
|
{% for task,task_options in cron_settings.tasks.items() %}
|
2017-07-28 01:43:45 +02:00
|
|
|
|
|
|
|
cron.{{ task }}:
|
|
|
|
cron.{{ task_options.type|default('present') }}:
|
|
|
|
- name: '{{ task_options.name }}'
|
|
|
|
{% if 'user' in task_options %}
|
|
|
|
- user: {{ task_options.user|default('root') }}
|
|
|
|
{% endif %}
|
|
|
|
{% if 'minute' in task_options %}
|
2018-03-06 16:15:19 +01:00
|
|
|
- minute: '{{ task_options.minute }}'
|
2017-07-28 01:43:45 +02:00
|
|
|
{% endif %}
|
|
|
|
{% if 'hour' in task_options %}
|
2018-03-06 16:15:19 +01:00
|
|
|
- hour: '{{ task_options.hour }}'
|
2017-07-28 01:43:45 +02:00
|
|
|
{% endif %}
|
|
|
|
{% if 'daymonth' in task_options %}
|
2018-03-06 16:15:19 +01:00
|
|
|
- daymonth: '{{ task_options.daymonth }}'
|
2017-07-28 01:43:45 +02:00
|
|
|
{% endif %}
|
2017-07-28 02:30:26 +02:00
|
|
|
{% if 'month' in task_options %}
|
2018-03-06 16:15:19 +01:00
|
|
|
- month: '{{ task_options.month }}'
|
2017-07-28 02:30:26 +02:00
|
|
|
{% endif %}
|
2017-07-28 01:43:45 +02:00
|
|
|
{% if 'dayweek' in task_options %}
|
2018-03-06 16:15:19 +01:00
|
|
|
- dayweek: '{{ task_options.dayweek }}'
|
2017-07-28 01:43:45 +02:00
|
|
|
{% endif %}
|
|
|
|
{% if 'commented' in task_options and task_options.commented %}
|
|
|
|
- commented: True
|
|
|
|
{% endif %}
|
|
|
|
{% if 'special' in task_options %}
|
|
|
|
- special: '{{ task_options.special }}'
|
|
|
|
{% endif %}
|
|
|
|
- identifier: '{{ task }}'
|
|
|
|
{% if 'comment' in task_options %}
|
|
|
|
- comment: '{{ task_options.comment }}'
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|