feat: setup syslog for alpine
This commit is contained in:
parent
4426ba1cb7
commit
dc43fc80cd
3 changed files with 19 additions and 0 deletions
|
|
@ -48,6 +48,13 @@
|
||||||
enabled: true
|
enabled: true
|
||||||
state: "restarted"
|
state: "restarted"
|
||||||
|
|
||||||
|
# ensure syslog enabled + started - alpine
|
||||||
|
- name: "restart syslog alpine"
|
||||||
|
ansible.builtin.service:
|
||||||
|
name: "syslog"
|
||||||
|
enabled: true
|
||||||
|
state: "started"
|
||||||
|
|
||||||
# ssh
|
# ssh
|
||||||
- name: "restart ssh"
|
- name: "restart ssh"
|
||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd:
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,17 @@
|
||||||
tags: "syslog"
|
tags: "syslog"
|
||||||
block:
|
block:
|
||||||
|
|
||||||
|
# configure syslog - alpine
|
||||||
|
- name: "syslog - config - busybox - alpine"
|
||||||
|
ansible.builtin.template:
|
||||||
|
src: "templates/syslog/busybox/syslog.alpine.j2"
|
||||||
|
dest: "/etc/conf.d/syslog"
|
||||||
|
owner: "root"
|
||||||
|
group: "root"
|
||||||
|
mode: "0644"
|
||||||
|
when: 'ansible_distribution == "Alpine"'
|
||||||
|
notify: "restart syslog alpine"
|
||||||
|
|
||||||
# configure rsyslogd - debian
|
# configure rsyslogd - debian
|
||||||
- name: "syslog - config - rsyslog - debian"
|
- name: "syslog - config - rsyslog - debian"
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
|
|
|
||||||
1
templates/syslog/busybox/syslog.alpine.j2
Normal file
1
templates/syslog/busybox/syslog.alpine.j2
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
SYSLOGD_OPTS="-R {{ rsyslog_destination }}:{{ rsyslog_port }}"
|
||||||
Loading…
Add table
Add a link
Reference in a new issue