Browse Source

Merge 34202c3cb9 into addd0d2da0

pull/237/merge
Kat R. 1 month ago
parent
commit
0ac01e3262
No account linked to committer's email address
1 changed files with 6 additions and 4 deletions
  1. +6
    -4
      linux/system/job.sls

+ 6
- 4
linux/system/job.sls View File

- linux.system.cron - linux.system.cron


{%- for name, job in system.job.items() %} {%- for name, job in system.job.items() %}
{%- set job_user = job.get('user', 'root') %}
{%- set job_user = job.get('user', 'root') %}
{%- set job_state_name = job.get('identifier', job.command) %}


linux_job_{{ job.command }}:
linux_job_{{ name }}:
{%- if job.get('enabled', True) %} {%- if job.get('enabled', True) %}
cron.present: cron.present:
- name: > - name: >
{{ job.command }}
{{ job_state_name }}
{%- if job.get('identifier', True) %} {%- if job.get('identifier', True) %}
- identifier: {{ job.get('identifier', job.get('name', name)) }} - identifier: {{ job.get('identifier', job.get('name', name)) }}
{%- endif %} {%- endif %}
{%- endif %} {%- endif %}
{%- else %} {%- else %}
cron.absent: cron.absent:
- name: {{ job.command }}
- name: >
{{ job_state_name }}
{%- if job.get('identifier', True) %} {%- if job.get('identifier', True) %}
- identifier: {{ job.get('identifier', job.get('name', name)) }} - identifier: {{ job.get('identifier', job.get('name', name)) }}
{%- endif %} {%- endif %}

Loading…
Cancel
Save