rsyslog.j2 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. {% if ansible_prolog -%}
  2. {% from 'templates/ansible/prolog.j2' import prolog with context %}
  3. {{ prolog() }}
  4. {% endif -%}
  5. /var/log/syslog
  6. /var/log/daemon.log
  7. /var/log/kern.log
  8. /var/log/user.log
  9. /var/log/lpr.log
  10. /var/log/cron.log
  11. /var/log/debug
  12. /var/log/messages
  13. {
  14. rotate 200
  15. daily
  16. dateext
  17. dateyesterday
  18. missingok
  19. notifempty
  20. delaycompress
  21. compress
  22. postrotate
  23. {% if ansible_lsb.codename == 'lenny' or ansible_lsb.codename == 'squeeze' %}
  24. invoke-rc.d rsyslog reload > /dev/null
  25. {% elif ansible_lsb.codename == 'jessie' or ansible_lsb.codename == 'stretch' %}
  26. invoke-rc.d rsyslog rotate > /dev/null
  27. {% else %}
  28. /usr/lib/rsyslog/rsyslog-rotate
  29. {% endif %}
  30. endscript
  31. }
  32. /var/log/auth.log
  33. /var/log/mail.info
  34. /var/log/mail.warn
  35. /var/log/mail.err
  36. /var/log/mail.log
  37. {
  38. rotate 1000
  39. daily
  40. dateext
  41. dateyesterday
  42. missingok
  43. notifempty
  44. compress
  45. delaycompress
  46. sharedscripts
  47. postrotate
  48. {% if ansible_lsb.codename == 'lenny' or ansible_lsb.codename == 'squeeze' %}
  49. invoke-rc.d rsyslog reload > /dev/null
  50. {% elif ansible_lsb.codename == 'jessie' or ansible_lsb.codename == 'stretch' %}
  51. invoke-rc.d rsyslog rotate > /dev/null
  52. {% else %}
  53. /usr/lib/rsyslog/rsyslog-rotate
  54. {% endif %}
  55. endscript
  56. }