Add syslog setup for shuttercontrol.log

This commit is contained in:
Stefan Haun 2022-07-23 20:47:16 +02:00
parent ca31f218c0
commit f257396bc2
2 changed files with 26 additions and 0 deletions

View file

@ -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
& ~

View file

@ -209,9 +209,31 @@
creates: "/home/{{ gatekeeper_user }}/mqtt-tools/agents/mqtt-clock" 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: handlers:
- name: restart mosquitto - name: restart mosquitto
service: service:
name: mosquitto name: mosquitto
state: restarted state: restarted
enabled: yes enabled: yes
- name: restart rsyslog
service:
name: rsyslog
state: restarted
enabled: yes