rsyslog.j2 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. {% else %}
  26. invoke-rc.d rsyslog rotate > /dev/null
  27. {% endif %}
  28. endscript
  29. }
  30. /var/log/auth.log
  31. /var/log/mail.info
  32. /var/log/mail.warn
  33. /var/log/mail.err
  34. /var/log/mail.log
  35. {
  36. rotate 1000
  37. daily
  38. dateext
  39. dateyesterday
  40. missingok
  41. notifempty
  42. compress
  43. delaycompress
  44. sharedscripts
  45. postrotate
  46. {% if ansible_lsb.codename == 'lenny' or ansible_lsb.codename == 'squeeze' %}
  47. invoke-rc.d rsyslog reload > /dev/null
  48. {% else %}
  49. invoke-rc.d rsyslog rotate > /dev/null
  50. {% endif %}
  51. endscript
  52. }