mirror of
https://github.com/saltstack-formulas/bind-formula.git
synced 2025-04-15 17:20:21 +00:00
use file mode from pillar or map for logrotate
This commit is contained in:
parent
4278bca7ab
commit
2c8de7bf24
1 changed files with 2 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
|||
{%- 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 }}/query.log {
|
||||
rotate 7
|
||||
daily
|
||||
|
@ -9,7 +10,7 @@
|
|||
sharedscripts
|
||||
copytruncate
|
||||
compress
|
||||
create 0664 {{ user }} {{ group }}
|
||||
create {{ mode }} {{ user }} {{ group }}
|
||||
{% if not salt['pkg.version']('logrotate').startswith('3.7')-%}
|
||||
su {{ user }} {{ group }}
|
||||
{% endif %}
|
||||
|
|
Loading…
Add table
Reference in a new issue