projects
/
mirror
/
dsa-puppet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
remove vivaldi (RT#3802)
[mirror/dsa-puppet.git]
/
modules
/
vsftpd
/
manifests
/
site.pp
diff --git
a/modules/vsftpd/manifests/site.pp
b/modules/vsftpd/manifests/site.pp
index
e1cfbe8
..
f8a71a0
100644
(file)
--- a/
modules/vsftpd/manifests/site.pp
+++ b/
modules/vsftpd/manifests/site.pp
@@
-1,44
+1,39
@@
define vsftpd::site (
define vsftpd::site (
- $source='',
- $content='',
+ $root,
$bind='',
$bind='',
+ $chown_user='',
+ $writable=false,
+ $banner="${name} FTP Server",
+ $max_clients=100,
+ $logfile="/var/log/ftp/vsftpd-${name}.debian.org.log",
$ensure=present
){
$ensure=present
){
- include vsftpd::nolisten
-
- if ($source and $content) {
- fail ( "Can't have both source and content for $name" )
- }
+ include vsftpd
case $ensure {
present,absent: {}
default: { fail ( "Invald ensure `$ensure' for $name" ) }
}
case $ensure {
present,absent: {}
default: { fail ( "Invald ensure `$ensure' for $name" ) }
}
+ $ftpsite = $name
+
$fname = "/etc/vsftpd-${name}.conf"
$fname = "/etc/vsftpd-${name}.conf"
- $noop = $::hostname ? {
- villa => false,
- lobos => false,
- steffani => false,
- default => true
+ file { $fname:
+ ensure => $ensure,
+ content => template('vsftpd/vsftpd.conf.erb')
}
}
- if $source {
- file { $fname:
- ensure => $ensure,
- noop => $noop,
- source => $source,
- }
- } elsif $content {
- file { $fname:
- ensure => $ensure,
- noop => $noop,
- content => $content,
- }
- } else {
- fail ( "Need one of source or content for $name" )
+ file { "/etc/logrotate.d/vsftpd-${name}":
+ 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
}
# We don't need a firewall rule because it's added in vsftp.pp
@@
-49,7
+44,9
@@
define vsftpd::site (
port => 'ftp',
server_args => $fname,
ferm => false,
port => 'ftp',
server_args => $fname,
ferm => false,
+ instances => $max_clients,
require => File[$fname]
}
require => File[$fname]
}
+ Service['vsftpd']->Service['xinetd']
}
}