diff --git a/files/hina/newsyslog.conf.d/rsyslog.conf b/files/hina/newsyslog.conf.d/rsyslog.conf new file mode 100644 index 0000000000000000000000000000000000000000..408bc2890a0eeb6090f381caa64ab7a05965a961 --- /dev/null +++ b/files/hina/newsyslog.conf.d/rsyslog.conf @@ -0,0 +1 @@ +/var/log/haproxy.log rsyslogd:rsyslogd 644 3 * $W1D0 diff --git a/files/hina/rsyslog.conf b/files/hina/rsyslog.conf new file mode 100644 index 0000000000000000000000000000000000000000..9318e07fcd238b6d704e3f31e8dbd2af06d76df1 --- /dev/null +++ b/files/hina/rsyslog.conf @@ -0,0 +1,6 @@ +# Provides TCP syslog reception +$ModLoad imudp.so +$UDPServerAddress 10.42.254.195 +$UDPServerRun 5514 + +*.* /var/log/haproxy.log diff --git a/manifests/hina.pp b/manifests/hina.pp index bfec666abca6c8735b3afb5640b76ed01fa55bdd..686ac043ff2234588175f4d9fdf44da6cc7d39c1 100644 --- a/manifests/hina.pp +++ b/manifests/hina.pp @@ -9,6 +9,7 @@ class ftp::hina { 'node_exporter', 'py37-certbot-nginx', 'rsync', + 'rsyslog', 'tor', 'vsftpd-ssl', ]: @@ -95,6 +96,35 @@ class ftp::hina { purge => false, } + file { '/usr/local/etc/rsyslog.conf': + ensure => file, + source => 'puppet:///modules/ftp/hina/rsyslog.conf', + owner => 'root', + group => 'wheel', + mode => '0644', + } + + user { 'rsyslogd-user': + ensure => present, + name => 'rsyslogd', + home => '/var/empty', + shell => '/usr/sbin/nologin', + } + + file_line { 'start rsyslogd': + path => '/etc/rc.local', + line => 'daemon -u rsyslogd rsyslogd -iNONE', + } + + file { '/var/log/haproxy.log': + ensure => present, + content => '', + replace => 'no', + owner => 'rsyslogd', + group => 'rsyslogd', + mode => '0644', + } + file { 'ftprsync': ensure => file, path => '/usr/local/bin',