1
0
Fork 0
mirror of synced 2024-12-21 21:51:09 -05:00

Merge pull request #12 from fortune-juggle/fix/5

fixes issue #5
This commit is contained in:
Nitin Madhok 2015-05-05 11:11:35 -04:00
commit d6ce3cd1bc
3 changed files with 29 additions and 12 deletions

View file

@ -6,7 +6,7 @@ include:
- logrotate
{% for key,value in jobs.iteritems() %}
{{key}}:
logrotate_{{key}}:
file.managed:
- name: {{ logrotate.include_dir }}/{{ key.split("/")[-1] }}
- source: salt://logrotate/templates/job.tmpl
@ -19,6 +19,11 @@ include:
- watch_in:
- service: {{ logrotate.service }}
- context:
{% if value is mapping %}
path: {{ value.get('path', key) }}
data: {{ value.get('config', []) }}
{% else %}
path: {{ key }}
data: {{ value }}
{% endif %}
{%- endfor -%}

View file

@ -4,12 +4,24 @@ logrotate:
pkg: logrotate
service: crond
jobs:
/tmp/var/log/mysql/error:
- weekly
- missingok
- rotate 52
- compress
- delaycompress
- notifempty
- create 640 root adm
- sharedscripts
/tmp/var/log/mysql/error:
config:
- weekly
- missingok
- rotate 52
- compress
- delaycompress
- notifempty
- create 640 root adm
- sharedscripts
mysql:
path: /tmp/var/log/mysql/*.log
config:
- weekly
- missingok
- rotate 52
- compress
- delaycompress
- notifempty
- create 640 root adm
- sharedscripts