mirror of https://github.com/Aidaho12/haproxy-wi
Configure logrotate for Debian
parent
b3bea63275
commit
d46e76fc4b
|
@ -6,10 +6,18 @@
|
|||
ignore_errors: yes
|
||||
notify: restart rsyslog
|
||||
|
||||
- name: Installing HAProxy conf for logrotate
|
||||
- name: Installing HAProxy conf for logrotate on EL
|
||||
template:
|
||||
src: /var/www/haproxy-wi/app/scripts/ansible/roles/haproxy/templates/logrotate.conf.j2
|
||||
dest: /etc/logrotate.d/haproxy.conf
|
||||
force: no
|
||||
when: (ansible_facts['os_family'] == "RedHat" or ansible_facts['os_family'] == 'CentOS')
|
||||
ignore_errors: yes
|
||||
ignore_errors: yes
|
||||
|
||||
- name: Installing HAProxy conf for logrotate on Debian
|
||||
template:
|
||||
src: /var/www/haproxy-wi/app/scripts/ansible/roles/haproxy/templates/logrotate-debian.conf.j2
|
||||
dest: /etc/logrotate.d/haproxy-roxy-wi
|
||||
force: no
|
||||
when: (ansible_facts['os_family'] == "Debian" or ansible_facts['os_family'] == 'Ubuntu')
|
||||
ignore_errors: yes
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
/var/log/haproxy/access.log {
|
||||
daily
|
||||
rotate 10
|
||||
missingok
|
||||
notifempty
|
||||
compress
|
||||
sharedscripts
|
||||
postrotate
|
||||
[ ! -x /usr/lib/rsyslog/rsyslog-rotate ] || /usr/lib/rsyslog/rsyslog-rotate
|
||||
endscript
|
||||
}
|
||||
|
||||
/var/log/haproxy/error.log {
|
||||
daily
|
||||
rotate 10
|
||||
missingok
|
||||
notifempty
|
||||
compress
|
||||
sharedscripts
|
||||
postrotate
|
||||
[ ! -x /usr/lib/rsyslog/rsyslog-rotate ] || /usr/lib/rsyslog/rsyslog-rotate
|
||||
endscript
|
||||
}
|
||||
|
||||
/var/log/haproxy/status.log {
|
||||
daily
|
||||
rotate 10
|
||||
missingok
|
||||
notifempty
|
||||
compress
|
||||
sharedscripts
|
||||
postrotate
|
||||
[ ! -x /usr/lib/rsyslog/rsyslog-rotate ] || /usr/lib/rsyslog/rsyslog-rotate
|
||||
endscript
|
||||
}
|
Loading…
Reference in New Issue