X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fvsftpd%2Fmanifests%2Fsite.pp;h=4adb08a9dabc7e4d9572692202783001a1b7015e;hb=a001db15a8463b3aac135b05343aca2ac7dc2aa9;hp=f65387588631ee3ed2e2d92c34a7cd17e3f2631b;hpb=6a02cbaab2c9399fb86b883037fad6e894b2d790;p=mirror%2Fdsa-puppet.git diff --git a/modules/vsftpd/manifests/site.pp b/modules/vsftpd/manifests/site.pp index f65387588..4adb08a9d 100644 --- a/modules/vsftpd/manifests/site.pp +++ b/modules/vsftpd/manifests/site.pp @@ -3,30 +3,38 @@ define vsftpd::site ( $bind='', $chown_user='', $writable=false, + $writable_other=false, $banner="${name} FTP Server", $max_clients=100, $logfile="/var/log/ftp/vsftpd-${name}.debian.org.log", $ensure=present ){ - include vsftpd::nolisten + include vsftpd case $ensure { present,absent: {} default: { fail ( "Invald ensure `$ensure' for $name" ) } } + $ftpsite = $name + $fname = "/etc/vsftpd-${name}.conf" file { $fname: ensure => $ensure, - noop => true, content => template('vsftpd/vsftpd.conf.erb') } file { "/etc/logrotate.d/vsftpd-${name}": - ensure => $ensure, - content => template('vsftpd/logrotate.erb') + ensure => absent + } + + munin::check { "vsftpd-${name}": + script => 'vsftpd' + } + munin::conf { "vsftpd-${name}": + content => template('vsftpd/munin.erb') } # We don't need a firewall rule because it's added in vsftp.pp @@ -34,11 +42,12 @@ define vsftpd::site ( bind => $bind, id => "${name}-ftp", server => '/usr/sbin/vsftpd', - port => 'ftp', + service => 'ftp', server_args => $fname, ferm => false, instances => $max_clients, require => File[$fname] } + Service['vsftpd']->Service['xinetd'] }