Add tmpfiles.d override for file permissions
The permissions for /var/log/syslog were being reset on boot
This commit is contained in:
parent
02919f87fc
commit
25bde1105f
@ -4,6 +4,20 @@
|
|||||||
rsyslog_default_rules_state: absent
|
rsyslog_default_rules_state: absent
|
||||||
when: rsyslog_archival_format_enabled
|
when: rsyslog_archival_format_enabled
|
||||||
|
|
||||||
|
- name: configure systemd tmpfiles.d
|
||||||
|
template:
|
||||||
|
src: tmpfiles_d-rsyslog.conf
|
||||||
|
dest: /etc/tmpfiles.d/00rsyslog.conf
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: 0644
|
||||||
|
when: rsyslog_archival_format_enabled
|
||||||
|
|
||||||
|
- name: manage systemd tmpfiles.d override
|
||||||
|
file:
|
||||||
|
path: /etc/tmpfiles.d/00rsyslog.conf
|
||||||
|
state: "{{ rsyslog_archival_format_enabled | ternary('file', 'absent') }}"
|
||||||
|
|
||||||
- name: find default log files
|
- name: find default log files
|
||||||
find:
|
find:
|
||||||
path: /var/log
|
path: /var/log
|
||||||
|
3
roles/rsyslog/templates/tmpfiles_d-rsyslog.conf
Normal file
3
roles/rsyslog/templates/tmpfiles_d-rsyslog.conf
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# {{ ansible_managed }}
|
||||||
|
|
||||||
|
d /var/log/syslog {{ rsyslog_dir_create_mode }} {{ rsyslog_dir_owner }} {{ rsyslog_dir_group }} -
|
Loading…
Reference in New Issue
Block a user