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

29 行
753B

  1. # -*- coding: utf-8 -*-
  2. # vim: ft=jinja
  3. {%- import_yaml "logrotate/defaults.yaml" as default_settings %}
  4. {%- import_yaml "logrotate/osfamilymap.yaml" as osfamilymap %}
  5. {%- import_yaml "logrotate/osmap.yaml" as osmap %}
  6. {#- Retrieve the config dict only once #}
  7. {%- set _config = salt['config.get']('logrotate', default={}) %}
  8. {%- set defaults = salt['grains.filter_by'](
  9. default_settings,
  10. default='logrotate',
  11. merge=salt['grains.filter_by'](
  12. osfamilymap,
  13. grain='os_family',
  14. merge=salt['grains.filter_by'](
  15. osmap,
  16. grain='os',
  17. merge=salt['grains.filter_by'](
  18. _config,
  19. default='lookup'
  20. )
  21. )
  22. )
  23. )
  24. %}
  25. {%- set logrotate = defaults %}