Browse Source

Support multiple log path

master
edwin 9 years ago
parent
commit
fdfb263e09
2 changed files with 5 additions and 2 deletions
  1. +1
    -1
      logrotate/jobs.sls
  2. +4
    -1
      logrotate/templates/job.tmpl

+ 1
- 1
logrotate/jobs.sls View File

- service: {{ logrotate.service }} - service: {{ logrotate.service }}
- context: - context:
{% if value is mapping %} {% if value is mapping %}
path: {{ value.get('path', key) }}
path: {{ value.get('path', []) }}
data: {{ value.get('config', []) }} data: {{ value.get('config', []) }}
{% else %} {% else %}
path: {{ key }} path: {{ key }}

+ 4
- 1
logrotate/templates/job.tmpl View File

# vim: sw=2 sts=2 ts=2 sw et # vim: sw=2 sts=2 ts=2 sw et
{{ path }} {
{% for onepath in path %}
{{ onepath }}
{%- endfor %}
{
{% for item in data %} {% for item in data %}
{{ item }} {{ item }}
{%- endfor %} {%- endfor %}

Loading…
Cancel
Save