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

12345678910111213141516171819
  1. {% from "logrotate/map.jinja" import logrotate with context %}
  2. logrotate:
  3. pkg.installed:
  4. - name: {{ logrotate.pkg|json }}
  5. service.running:
  6. - name: {{ logrotate.service }}
  7. - enable: True
  8. logrotate_directory:
  9. file.directory:
  10. - name: {{ logrotate.include_dir }}
  11. - user: {{ salt['pillar.get']('logrotate:config:user', logrotate.user) }}
  12. - group: {{ salt['pillar.get']('logrotate:config:group', logrotate.group) }}
  13. - mode: 755
  14. - makedirs: True
  15. - require:
  16. - pkg: logrotate