Modern syslogs (such as rsyslog and syslog-ng > 3.6) pull from the
systemd journal themselves. Tell systemd to not forward the messages
to syslog. Also change it so syslog-ng no longer hooks into the
syslog.socket early boot stuff, since that causes headaches when it
tries to connect to loghost and can't resolve names.
}
if $systemd {
+ include systemd
$servicefiles = 'present'
} else {
$servicefiles = 'absent'
[Service]
Type=notify
-Sockets=syslog.socket
ExecStart=/usr/sbin/syslog-ng -F
ExecReload=/bin/kill -HUP $MAINPID
-StandardOutput=null
+StandardOutput=journal
+StandardError=journal
Restart=always
[Install]
WantedBy=multi-user.target
-Alias=syslog.service
source => 'puppet:///modules/syslog-ng/syslog-ng.service',
notify => Exec['systemctl daemon-reload'],
}
+
+ file { '/etc/systemd/system/syslog.service':
+ ensure => absent,
+ notify => Exec['systemctl daemon-reload'],
+ }
}
}
--- /dev/null
+##
+## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
+## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
+##
+
+[Journal]
+ForwardToSyslog=no
--- /dev/null
+class systemd {
+ file { '/etc/systemd/journald.conf':
+ source => 'puppet:///modules/systemd/journald.conf',
+ }
+}