1
0
Fork 0
mirror of synced 2024-11-17 22:45:34 -05:00
formula-logrotate/logrotate/map.jinja
2017-02-14 17:13:57 +01:00

48 lines
1.1 KiB
Django/Jinja

# -*- coding: utf-8 -*-
# vim: ft=jinja
{% import_yaml 'logrotate/defaults.yaml' as default_settings %}
{% set os_family_map = salt['grains.filter_by']({
'Arch': {
'service': 'logrotate.timer',
'default_config': {
'tabooext': '+ .pacorig .pacnew .pacsave',
},
},
'RedHat': {
'service': 'crond',
'default_config': {
'dateext': True,
},
},
'Suse': {
'login_records_jobs': False,
'default_config': {
'dateext': True,
'compresscmd': '/usr/bin/xz',
'uncompresscmd': '/usr/bin/xzdec',
},
},
},
grain="os_family",
merge=salt['pillar.get']('logrotate:lookup')) or {}
%}
{% set os_map = salt['grains.filter_by']({
'Ubuntu': {
'default_config': {
'su': 'root syslog'
},
},
},
grain="os",
merge=os_family_map) or {}
%}
{% set logrotate = salt['grains.filter_by'](
default_settings,
merge=os_map,
base='logrotate',
)
%}