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

12345678910111213141516171819
  1. {% from "logrotate/map.jinja" import logrotate with context %}
  2. include:
  3. - logrotate
  4. logrotate_config:
  5. file.managed:
  6. - name: {{ logrotate.conf_file }}
  7. - source: salt://logrotate/files/{{ salt['grains.get']('os_family') }}/logrotate.conf
  8. - template: jinja
  9. - user: {{ salt['pillar.get']('logrotate:config:user', logrotate.user) }}
  10. - group: {{ salt['pillar.get']('logrotate:config:group', logrotate.group) }}
  11. - mode: {{ salt['pillar.get']('logrotate:config:mode', '644') }}
  12. - require:
  13. - pkg: logrotate
  14. - watch_in:
  15. - service: {{ logrotate.service }}