Move syslog into its own template, not cron
authorMichael Brown <michael.brown@discourse.org>
Thu, 31 Jul 2014 05:03:57 +0000 (01:03 -0400)
committerMichael Brown <michael.brown@discourse.org>
Thu, 31 Jul 2014 05:03:57 +0000 (01:03 -0400)
* create syslog.template.yml
* disable klog syslog source (thanks phusion/baseimage-docker)

samples/data.yml
samples/standalone.yml
templates/cron.template.yml
templates/syslog.template.yml [new file with mode: 0644]

index 38ccdd4b7f4ed066efd8688df0a0420f048ed3eb..df4864fa1d6c64d1a318ce99d8af3790e09ba923 100644 (file)
@@ -2,6 +2,7 @@
 #
 templates:
   - "templates/cron.template.yml"
+  - "templates/syslog.template.yml"
   - "templates/postgres.template.yml"
   - "templates/redis.template.yml"
   - "templates/sshd.template.yml"
index cc9736c4ee643c9221d56e5e454e061174beebfb..70b1c8e69482b9ffdd864237a169f34d32e79f04 100644 (file)
@@ -8,6 +8,7 @@
 ## this is the all-in-one, standalone Discourse Docker container template
 templates:
   - "templates/cron.template.yml"
+  - "templates/syslog.template.yml"
   - "templates/postgres.template.yml"
   - "templates/redis.template.yml"
   - "templates/sshd.template.yml"
index f98de082680183e4e0500d678c7a375461ae7790..259954a9295359b229be2737f1b914ffa20baa59 100644 (file)
@@ -7,17 +7,6 @@ run:
         exec 2>&1
         cd /
         exec cron -f
-  - file:
-     path: /etc/service/rsyslog/run
-     chmod: "+x"
-     contents: |
-        #!/bin/bash
-        exec 2>&1
-        cd /
-        exec rsyslogd -n
-
   - exec:
       hook: cron
       cmd: echo cron installed
-  - exec:
-      cmd: apt-get -y install rsyslog
diff --git a/templates/syslog.template.yml b/templates/syslog.template.yml
new file mode 100644 (file)
index 0000000..72c3339
--- /dev/null
@@ -0,0 +1,16 @@
+run:
+  - file:
+     path: /etc/service/rsyslog/run
+     chmod: "+x"
+     contents: |
+        #!/bin/bash
+        exec 2>&1
+        cd /
+        exec rsyslogd -n
+
+  - exec: apt-get -y install rsyslog
+  - replace:
+      filename: "/etc/rsyslog.conf"
+      from: "$ModLoad imklog"
+      to: "#$ModLoad imklog"
+