|
|
|
|
|
|
|
|
- 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 %} |