Support multiple log path

pull/18/head
edwin 8 years ago
parent 6692c23a8b
commit fdfb263e09
  1. 2
      logrotate/jobs.sls
  2. 5
      logrotate/templates/job.tmpl

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

@ -1,5 +1,8 @@
# vim: sw=2 sts=2 ts=2 sw et
{{ path }} {
{% for onepath in path %}
{{ onepath }}
{%- endfor %}
{
{% for item in data %}
{{ item }}
{%- endfor %}

Loading…
Cancel
Save