X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fvsftpd%2Fmanifests%2Fsite.pp;h=98cca97764bd1ac5b11d2316783df6324fb943ad;hb=9f88565cb9882258e5033b3c349a50f9732eecbd;hp=338a59274b44706f9a65915dd0f89af2bb9e5529;hpb=67dafc0ea24e8db77df45a570b10ce7e796e5cb3;p=mirror%2Fdsa-puppet.git diff --git a/modules/vsftpd/manifests/site.pp b/modules/vsftpd/manifests/site.pp index 338a59274..98cca9776 100644 --- a/modules/vsftpd/manifests/site.pp +++ b/modules/vsftpd/manifests/site.pp @@ -3,19 +3,22 @@ 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: @@ -24,20 +27,30 @@ define vsftpd::site ( } file { "/etc/logrotate.d/vsftpd-${name}": + ensure => absent + } + + munin::check { "vsftpd-${name}": + ensure => $ensure, + script => 'vsftpd' + } + munin::conf { "vsftpd-${name}": ensure => $ensure, - content => template('vsftpd/logrotate.erb') + content => template('vsftpd/munin.erb') } # We don't need a firewall rule because it's added in vsftp.pp xinetd::service { "vsftpd-${name}": + ensure => $ensure, 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'] }