saltstack-formulas / logrotate-formula

http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
Other
23 stars 71 forks source link

Improvements: combined paths on logrotate.jobs #13

Closed egarbi closed 8 years ago

egarbi commented 9 years ago

I don't know if this is even possible to achieve, but it would be great if state support something like this: /var/log/cron /var/log/maillog /var/log/messages /var/log/secure /var/log/spooler { sharedscripts postrotate /bin/kill -HUP cat /var/run/syslogd.pid 2> /dev/null 2> /dev/null || true endscript } it would save many lines on pillars

edwin--zhao commented 8 years ago

update jobs.sls: change line 23: --- path: {{ value.get('path', key) }} +++ path: {{ value.get('path', []) }}

update templates/job.tmpl {% for onepath in path %} {{ onepath }} {%- endfor %} { {% for item in data %} {{ item }} {%- endfor %} }

now pillar you config like: jobs: path: