rsyslog.j2 1.3 KB

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