bind-formula/bind/files/debian/logrotate_bind
2018-03-30 14:57:00 +02:00

17 lines
552 B
Text

{%- from "bind/map.jinja" import map with context %}
{%- set user = salt['pillar.get']('bind:config:user', map.user) %}
{%- set group = salt['pillar.get']('bind:config:group', map.group) %}
{%- set mode = salt['pillar.get']('bind:config:log_mode', map.log_mode) %}
{{ map.log_dir }}/*.log {
rotate 7
daily
missingok
notifempty
sharedscripts
copytruncate
compress
create {{ mode }} {{ user }} {{ group }}
{% if not salt['pkg.version']('logrotate').startswith('3.7')-%}
su {{ user }} {{ group }}
{% endif %}
}