Saltstack Official Linux Formula
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

pirms 9 gadiem
pirms 9 gadiem
pirms 9 gadiem
pirms 9 gadiem
pirms 9 gadiem
pirms 9 gadiem
pirms 9 gadiem
pirms 9 gadiem
pirms 9 gadiem
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. {%- from "linux/map.jinja" import system with context %}
  2. {%- if system.enabled %}
  3. include:
  4. - linux.system.user
  5. - linux.system.cron
  6. {%- for name, job in system.job.items() %}
  7. {%- set job_user = job.get('user', 'root') %}
  8. linux_job_{{ job.command }}:
  9. {%- if job.get('enabled', True) %}
  10. cron.present:
  11. - name: >
  12. {{ job.command }}
  13. {%- if job.get('identifier', True) %}
  14. - identifier: {{ job.get('identifier', job.get('name', name)) }}
  15. {%- endif %}
  16. - user: {{ job_user }}
  17. {%- if job.special is defined %}
  18. - special: '{{ job.special }}'
  19. {%- else %}
  20. {%- if job.minute is defined %}
  21. - minute: '{{ job.minute }}'
  22. {%- endif %}
  23. {%- if job.hour is defined %}
  24. - hour: '{{ job.hour }}'
  25. {%- endif %}
  26. {%- if job.daymonth is defined %}
  27. - daymonth: '{{ job.daymonth }}'
  28. {%- endif %}
  29. {%- if job.month is defined %}
  30. - month: '{{ job.month }}'
  31. {%- endif %}
  32. {%- if job.dayweek is defined %}
  33. - dayweek: '{{ job.dayweek }}'
  34. {%- endif %}
  35. {%- endif %}
  36. - require:
  37. - sls: linux.system.cron
  38. {%- if job_user in system.get('user', {}).keys() %}
  39. - user: system_user_{{ job_user }}
  40. {%- endif %}
  41. {%- else %}
  42. cron.absent:
  43. - name: {{ job.command }}
  44. {%- if job.get('identifier', True) %}
  45. - identifier: {{ job.get('identifier', job.get('name', name)) }}
  46. {%- endif %}
  47. - user: {{ job_user }}
  48. {%- endif %}
  49. {%- endfor %}
  50. {%- endif %}