diff --git a/tasks/main.yml b/tasks/main.yml index d4703f4e3550187f1f3f07932a4e3bb908d73c51..8b671aaf8763ec99a0efa7995c47772ffb17efd3 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -53,6 +53,14 @@ - "Include NetData to Boot-List" - "Start NetData" + - name: "Install logrotate script" + template: + src=etc_logrotate_d_netdata + dest=/etc/logrotate.d/netdata + owner=root + group=root + mode=644 + - name: "Configure Registry" ini_file: dest='/etc/netdata/netdata.conf' diff --git a/templates/etc_logrotate_d_netdata b/templates/etc_logrotate_d_netdata new file mode 100644 index 0000000000000000000000000000000000000000..3ad220f2f9da015d5ad41fad8b31634142062b21 --- /dev/null +++ b/templates/etc_logrotate_d_netdata @@ -0,0 +1,13 @@ +/var/log/netdata/*.log { + daily + missingok + rotate 14 + compress + delaycompress + notifempty + sharedscripts + create 640 netdata netdata + postrotate + /usr/sbin/service netdata restart >/dev/null + endscript +}