Saltstack Official Logrotate Formula
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
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 %}