decomission klecker rt#7582
[mirror/dsa-puppet.git] / modules / syslog_ng / templates / syslog-ng.conf.erb
index d42304e..a6c9a93 100644 (file)
@@ -4,6 +4,9 @@
 <%- elsif has_variable?("syslogversion") and @syslogversion.to_s == "3.8" -%>
 @version: 3.8
 @include "scl.conf"
+<%- elsif has_variable?("syslogversion") and @syslogversion.to_s == "3.19" -%>
+@version: 3.19
+@include "scl.conf"
 <%- else -%>
 @version: 3.3
 @include "scl.conf"
@@ -110,7 +113,7 @@ source s_local {
 <%- end -%>
 };
 
-<%- if (@hostname == "lotti") || (@hostname == "loghost-grnet-01") || (@hostname == "loghost-osuosl-01") -%>
+<% if @loghosts and @loghosts.include?(@fqdn)-%>
 source s_network {
        tcp6(port(5140) max-connections(400)
                tls( key_file("/etc/exim4/ssl/thishost.key")
@@ -395,54 +398,31 @@ log {
 };
 <%- end -%>
 
-
- <%- if @hostname != "lotti" -%>
-destination loghost-lotti {
-       tcp("lotti.debian.org" port (5140)
-               tls( key_file("/etc/ssl/private/thishost.key")
-                    cert_file("/etc/ssl/debian/certs/thishost.crt")
-                    ca_dir("/etc/ssl/debian/certs/")
-               )
-       );
-};
- <%- end -%>
-  <%- if @hostname != "loghost-grnet-01" -%>
-destination loghost-loghost-grnet-01 {
-       tcp("loghost-grnet-01.debian.org" port (5140)
-               tls( key_file("/etc/ssl/private/thishost.key")
-                    cert_file("/etc/ssl/debian/certs/thishost.crt")
-                    ca_dir("/etc/ssl/debian/certs/")
-               )
-       );
-};
- <%- end -%>
-  <%- if @hostname != "loghost-osuosl-01" -%>
-destination loghost-loghost-osuosl-01 {
-       tcp("loghost-osuosl-01.debian.org" port (5140)
+<% if @loghosts -%>
+  <% @loghosts.each do |loghost| -%>
+destination loghost-<%= loghost %> {
+       tcp("<%= loghost %>" port (5140)
                tls( key_file("/etc/ssl/private/thishost.key")
                     cert_file("/etc/ssl/debian/certs/thishost.crt")
                     ca_dir("/etc/ssl/debian/certs/")
                )
        );
 };
- <%- end -%>
+  <% end -%>
+<% end -%>
 
 log {
        source(s_local);
- <%- if @hostname != "lotti" -%>
-       destination(loghost-lotti);
- <%- end -%>
- <%- if @hostname != "loghost-grnet-01" -%>
-       destination(loghost-loghost-grnet-01);
- <%- end -%>
- <%- if @hostname != "loghost-osuosl-01" -%>
-       destination(loghost-loghost-osuosl-01);
- <%- end -%>
+<% if @loghosts -%>
+  <% @loghosts.each do |loghost| -%>
+    <%- if loghost != @fqdn -%>
+       destination(loghost-<%= loghost %>);
+    <% end -%>
+  <% end -%>
+<% end -%>
 };
 
-
-
-<%- if (@hostname == "lotti") || (@hostname == "loghost-grnet-01") || (@hostname == "loghost-osuosl-01") -%>
+<% if @loghosts and @loghosts.include?(@fqdn)-%>
 ###############################################################################
 ########## ON LOG HOST ########################################################
 ###############################################################################
@@ -560,4 +540,5 @@ destination fastly { file("/var/log/fastly.log"); };
 log { source(s_network_fastly);
       destination(fastly); };
 
-<%- end -%>
+
+<% end -%>