1
0
Fork 0

Pillar configuration structure change to allow file paths with globs

This commit is contained in:
Michal Galet 2015-04-02 21:04:07 +02:00
parent 73c86743e2
commit d94c227d4d
2 changed files with 16 additions and 14 deletions

View File

@ -5,10 +5,10 @@
include:
- logrotate
{% for key,value in jobs.iteritems() %}
{{key}}:
{% for job_name,value in jobs.iteritems() %}
{{ value.path }}:
file.managed:
- name: {{ logrotate.include_dir }}/{{ key.split("/")[-1] }}
- name: {{ logrotate.include_dir }}/{{ job_name }}
- source: salt://logrotate/templates/job.tmpl
- template: jinja
- user: {{ salt['pillar.get']('logrotate:config:user', logrotate.user) }}
@ -19,6 +19,6 @@ include:
- watch_in:
- service: {{ logrotate.service }}
- context:
path: {{ key }}
data: {{ value }}
path: {{ value.path }}
data: {{ value.data }}
{%- endfor -%}

View File

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