Saltstack Official Linux Formula
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

33 行
788B

  1. {%- from "linux/map.jinja" import system with context %}
  2. {%- if system.enabled %}
  3. {%- for name, job in system.job.iteritems() %}
  4. linux_job_{{ job.command }}:
  5. {%- if job.enabled %}
  6. cron.present:
  7. - name: {{ job.command }}
  8. - user: {{ job.user }}
  9. {%- if job.minute is defined %}
  10. - minute: '{{ job.minute }}'
  11. {%- endif %}
  12. {%- if job.hour is defined %}
  13. - hour: '{{ job.hour }}'
  14. {%- endif %}
  15. {%- if job.daymonth is defined %}
  16. - daymonth: '{{ job.daymonth }}'
  17. {%- endif %}
  18. {%- if job.month is defined %}
  19. - month: '{{ job.month }}'
  20. {%- endif %}
  21. {%- if job.dayweek is defined %}
  22. - dayweek: '{{ job.dayweek }}'
  23. {%- endif %}
  24. {%- else %}
  25. job.absent:
  26. - name: {{ job.command }}
  27. {%- endif %}
  28. {%- endfor %}
  29. {%- endif %}