diff --git a/files/platon/syslog-shuttercontrol.conf b/files/platon/syslog-shuttercontrol.conf new file mode 100644 index 0000000..c35ff71 --- /dev/null +++ b/files/platon/syslog-shuttercontrol.conf @@ -0,0 +1,4 @@ +if $programname == 'lockfailsafe' then /var/log/shuttercontrol.log +if $programname == 'shuttercontrol' then /var/log/shuttercontrol.log +if $programname == 'doorservice' then /var/log/shuttercontrol.log +& ~ diff --git a/platon.yml b/platon.yml index 3b0265c..8900299 100644 --- a/platon.yml +++ b/platon.yml @@ -209,9 +209,31 @@ creates: "/home/{{ gatekeeper_user }}/mqtt-tools/agents/mqtt-clock" + ### Syslog setup for shuttercontrol.log + + - name: Make sure shuttercontrol.log exists + ansible.builtin.file: + path: /var/log/shuttercontrol.log + state: touch + + - name: Copy syslog setting for shuttercontrol + ansible.builtin.copy: + src: files/platon/syslog-shuttercontrol.conf + dest: /etc/rsyslog.d/20-shuttercontrol.conf + owner: root + group: root + mode: "0644" + notify: restart rsyslog + handlers: - name: restart mosquitto service: name: mosquitto state: restarted enabled: yes + + - name: restart rsyslog + service: + name: rsyslog + state: restarted + enabled: yes