Add syslog setup for shuttercontrol.log
This commit is contained in:
parent
ca31f218c0
commit
f257396bc2
2 changed files with 26 additions and 0 deletions
4
files/platon/syslog-shuttercontrol.conf
Normal file
4
files/platon/syslog-shuttercontrol.conf
Normal 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
|
||||||
|
& ~
|
22
platon.yml
22
platon.yml
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue