Do not purge /etc/rsyslog.d
Remove the default /etc/rsyslog.d/50-default.conf config file created by
the rsyslog package instead of completely purging the /etc/rsyslog.d/
directory. Purging will remove all the config files added by other
packages (the haproxy package adds /etc/rsyslog.d/49-haproxy.conf for
example).
diff --git a/rsyslog/common.sls b/rsyslog/common.sls
index 1fdadd4..3cbb2ac 100644
--- a/rsyslog/common.sls
+++ b/rsyslog/common.sls
@@ -14,14 +14,10 @@
- require:
- pkg: rsyslog_packages
-/etc/rsyslog.d:
- file.directory:
- - mode: 0755
+/etc/rsyslog.d/50-default.conf:
+ file.absent:
- require:
- - pkg: rsyslog_packages
- {% if global.purge_rsyslog_d is defined and global.purge_rsyslog_d == true %}
- - clean: true
- {% endif %}
+ - pkgs: rsyslog_packages
rsyslog_service:
service.running:
diff --git a/rsyslog/map.jinja b/rsyslog/map.jinja
index e88c665..a322661 100644
--- a/rsyslog/map.jinja
+++ b/rsyslog/map.jinja
@@ -10,7 +10,6 @@
preserve_fqdn: false
non_kernel_facility: true
msg_reduction: true
- purge_rsyslog_d: true
manage_file_perms: true
perm_dir: "0755"
run_user: syslog