1
0
Fork 0
mirror of synced 2024-12-22 06:01:08 -05:00
formula-logrotate/logrotate/map.jinja

54 lines
1.2 KiB
Text
Raw Normal View History

2017-02-14 06:10:13 -05:00
# -*- coding: utf-8 -*-
# vim: ft=jinja
{% import_yaml 'logrotate/defaults.yaml' as default_settings %}
2017-02-14 06:10:13 -05:00
{% set os_family_map = salt['grains.filter_by']({
'Arch': {
'service': 'logrotate.timer',
'default_config': {
'tabooext': '+ .pacorig .pacnew .pacsave',
},
},
'Debian': {
'default_config': {
'compress': True,
},
},
2017-02-14 06:10:13 -05:00
'RedHat': {
'service': 'crond',
'default_config': {
'dateext': True,
},
2017-02-14 06:10:13 -05:00
},
'Suse': {
'login_records_jobs': False,
'default_config': {
'dateext': True,
'compresscmd': '/usr/bin/xz',
'uncompresscmd': '/usr/bin/xzdec',
},
2017-02-14 06:10:13 -05:00
},
2017-02-08 17:57:08 -05:00
},
2017-02-14 06:10:13 -05:00
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 {}
%}
2017-02-14 06:10:13 -05:00
2017-02-14 11:03:08 -05:00
{% set logrotate = salt['grains.filter_by'](
default_settings,
merge=os_map,
base='logrotate',
2017-02-14 06:10:13 -05:00
)
%}