tackle logs

This commit is contained in:
Yohaï-Eliel BERREBY 2020-04-06 17:42:54 +02:00
parent 51fdb89940
commit 7347829494
2 changed files with 14 additions and 5 deletions

View file

@ -8,6 +8,19 @@
retries: 3 retries: 3
until: apt_result is succeeded until: apt_result is succeeded
- name: Ensure dhcp log directory exists
file:
path: /var/log/dhcp
owner: root
group: root
mode: u=rwx,g=rx,a=rx
state: directory
- name: Ensute rsyslog knows where to send dhcp logs
lineinfile:
path: /etc/rsyslog.conf
regexp: '^local7[.][*]'
line: "local7.* /var/log/dhcp/dhcpd.log"
- name: Configure /etc/default/isc-dhcp-server - name: Configure /etc/default/isc-dhcp-server
template: template:
@ -15,7 +28,6 @@
dest: /etc/default/isc-dhcp-server dest: /etc/default/isc-dhcp-server
mode: 0644 mode: 0644
- name: Configure dhcp-failover.conf - name: Configure dhcp-failover.conf
template: template:
src: dhcp/dhcp-failover.conf.j2 src: dhcp/dhcp-failover.conf.j2

View file

@ -22,10 +22,7 @@ ddns-update-style none;
# network, the authoritative directive should be uncommented. # network, the authoritative directive should be uncommented.
authoritative; authoritative;
# Use this to send dhcp log messages to a different log file (you also log-facility local7;
# have to hack syslog.conf to complete the redirection).
# XXX: This was enabled in one building and disabled in another.
#log-facility local7;
# TODO: move this failover peer declaration to a separate file and include it. # TODO: move this failover peer declaration to a separate file and include it.