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.

map.jinja 671B

12345678910111213141516171819202122232425
  1. # -*- coding: utf-8 -*-
  2. # vim: ft=jinja
  3. {% import_yaml 'logrotate/defaults.yaml' as default_settings %}
  4. {% import_yaml "logrotate/osfamilymap.yaml" as os_family_map %}
  5. {% import_yaml "logrotate/osmap.yaml" as os_map %}
  6. {% set osfam = salt['grains.filter_by'](
  7. os_family_map,
  8. grain='os_family',
  9. ) or {} %}
  10. {% set os = salt['grains.filter_by'](
  11. os_map,
  12. grain='os',
  13. ) or {} %}
  14. {% do salt['defaults.merge'](default_settings['logrotate'], osfam) %}
  15. {% do salt['defaults.merge'](default_settings['logrotate'], os) %}
  16. {% set logrotate = salt['pillar.get'](
  17. 'logrotate:lookup',
  18. default=default_settings['logrotate'],
  19. merge=True,
  20. ) %}