ansible/node: Update modern rsyslog.conf for high resolution timestamp
authorMartin Schwenke <martin@meltin.net>
Sun, 12 Jul 2020 06:50:52 +0000 (16:50 +1000)
committerMartin Schwenke <martin@meltin.net>
Thu, 13 Aug 2020 00:49:05 +0000 (10:49 +1000)
Bizarrely, this setting can't be changed in an include file.

Signed-off-by: Martin Schwenke <martin@meltin.net>
ansible/node/roles/common/tasks/generic/rsyslog.yml

index 88535af0adf95fd8565958f4b99b85a91bcf601e..42b828dcc1f286dc517324b82ba65fe99d15a58c 100644 (file)
@@ -1,4 +1,16 @@
 ---
+
+# Note that this only configures the high-resolution timestamp format.
+# It doesn't turn off rate limiting (if it defaults to on) and it
+# doesn't enable the UDP listener.
+- name: update newer style rsyslog configuration
+  replace:
+    path: /etc/rsyslog.conf
+    regexp: RSYSLOG_TraditionalFileFormat
+    replace: RSYSLOG_FileFormat
+  notify:
+    - restart rsyslog
+
 - name: add autocluster-specific rsyslog configuration
   copy:
     src: rsyslog.conf