logrotate.conf.j2 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. # see "man logrotate" for details
  2. {{logrotate.cycle}}
  3. rotate {{logrotate.count}}
  4. # create new (empty) log files after rotating old ones
  5. create
  6. # uncomment this if you want your log files compressed
  7. #compress
  8. # packages drop log rotation information into this directory
  9. include /etc/logrotate.d
  10. # no packages own wtmp, or btmp -- we'll rotate them here
  11. /var/log/wtmp {
  12. missingok
  13. monthly
  14. create 0664 root utmp
  15. rotate 1
  16. }
  17. /var/log/btmp {
  18. missingok
  19. monthly
  20. create 0660 root utmp
  21. rotate 1
  22. }
  23. {% if 'gateways' in group_names or 'services' in group_names %}
  24. /var/log/named/bind.log {
  25. {{logrotate.cycle}}
  26. rotate {{logrotate.count}}
  27. copytruncate
  28. }
  29. {% endif %}
  30. {% if 'gateways' in group_names %}
  31. /var/log/tunneldigger-broker.log {
  32. {{logrotate.cycle}}
  33. rotate {{logrotate.count}}
  34. copytruncate
  35. }
  36. {% endif %}
  37. # system-specific logs may be configured here
  38. {% if 'dhcp_type' in hostvars[inventory_hostname] and dhcp_type == 'kea' %}
  39. /var/log/kea-dhcp4.log {
  40. {{logrotate.cycle}}
  41. rotate {{logrotate.count}}
  42. copytruncate
  43. }
  44. {% endif %}