]> git.donarmstrong.com Git - dsa-puppet.git/blobdiff - templates/syslog-ng.conf.erb
lotti for president^Wloghost
[dsa-puppet.git] / templates / syslog-ng.conf.erb
index 468fcbb0947d530f35efc0c1f6fc78b8c14dbd9d..f8b1b3cb400d08ca08c08cd8d67a2008c33f1829 100644 (file)
@@ -1,4 +1,4 @@
-<%- if defined? syslogversion and syslogversion.to_s == "3" -%>
+<%- if has_variable?("syslogversion") and syslogversion.to_s == "3" -%>
 @version: 3.0
 <%- end -%>
 ##
@@ -82,7 +82,7 @@ options {
        # is not a real hostname.
        bad_hostname("^gconfd$");
 
-<%- if hostname == "heininen" -%>
+<%- if (hostname == "heininen") || (hostname == "lotti") -%>
        # we trust our mutual authenticated syslog clients
        keep_hostname(yes);
 <%- end -%>
@@ -102,7 +102,7 @@ source s_local {
         # function to send logs to)
         unix-stream("/dev/log");
         # messages from the kernel
-<%- if defined? syslogversion and syslogversion.to_s == "2" -%>
+<%- if has_variable?("syslogversion") and syslogversion.to_s == "2" -%>
         file("/proc/kmsg" log_prefix("kernel: "));
 <%- else -%>
         file("/proc/kmsg" program_override("kernel: "));
@@ -112,7 +112,7 @@ source s_local {
         # function to send logs to)
         unix-dgram("/var/run/log");
         # messages from the kernel
-<%- if defined? syslogversion and syslogversion.to_s == "2" -%>
+<%- if has_variable?("syslogversion") and syslogversion.to_s == "2" -%>
         file("/dev/klog" log_prefix("kernel: "));
 <%- else -%>
         file("/dev/klog" program_override("kernel: "));
@@ -125,7 +125,7 @@ source s_local {
 <%- end -%>
 };
 
-<%-  if hostname == "heininen" -%>
+<%- if (hostname == "heininen") || (hostname == "lotti") -%>
 source s_network {
        tcp6(port(5140) max-connections(200)
                tls( key_file("/etc/exim4/ssl/thishost.key")
@@ -403,8 +403,8 @@ log {
 <%- end -%>
 
 
-<%- if hostname != "heininen" -%>
- <%- if defined? syslogversion and syslogversion.to_s == "3" -%>
+<%- if (hostname != "heininen") || (hostname != "lotti") -%>
+ <%- if has_variable?("syslogversion") and syslogversion.to_s == "3" -%>
 destination loghost-heininen {
        tcp("heininen.debian.org" port (5140)
                tls( key_file("/etc/ssl/debian/keys/thishost.key")
@@ -413,18 +413,27 @@ destination loghost-heininen {
                )
        );
 };
+destination loghost-lotti {
+       tcp("lotti.debian.org" port (5140)
+               tls( key_file("/etc/ssl/debian/keys/thishost.key")
+                    cert_file("/etc/ssl/debian/certs/thishost.crt")
+                    ca_dir("/etc/ssl/debian/certs/")
+               )
+       );
+};
 
 
 log {
        source(s_local);
        destination(loghost-heininen);
+       destination(loghost-lotti);
 };
  <%- end -%>
 <%- end -%>
 
 
 
-<%- if hostname == "heininen" -%>
+<%- if (hostname == "heininen") || (hostname == "lotti") -%>
 ###############################################################################
 ########## ON LOG HOST ########################################################
 ###############################################################################