Add tmpfiles.d override for file permissions

The permissions for /var/log/syslog were being reset on boot
This commit is contained in:
Ryan Cavicchioni 2019-12-03 20:14:59 -06:00
parent 02919f87fc
commit 25bde1105f
Signed by: ryanc
GPG Key ID: 877EEDAF9245103D
2 changed files with 17 additions and 0 deletions

View File

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

View File

@ -0,0 +1,3 @@
# {{ ansible_managed }}
d /var/log/syslog {{ rsyslog_dir_create_mode }} {{ rsyslog_dir_owner }} {{ rsyslog_dir_group }} -