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
7001455
..
f8a71a0
100644
(file)
--- a/
modules/vsftpd/manifests/site.pp
+++ b/
modules/vsftpd/manifests/site.pp
@@
-1,52
+1,52
@@
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 => fals
e,
- default => true
+ file { $fname:
+
ensure => $ensur
e,
+ 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
xinetd::service { "vsftpd-${name}":
bind => $bind,
}
# We don't need a firewall rule because it's added in vsftp.pp
xinetd::service { "vsftpd-${name}":
bind => $bind,
- id =>
$name
,
+ id =>
"${name}-ftp"
,
server => '/usr/sbin/vsftpd',
port => 'ftp',
server_args => $fname,
ferm => false,
server => '/usr/sbin/vsftpd',
port => 'ftp',
server_args => $fname,
ferm => false,
+ instances => $max_clients,
+ require => File[$fname]
}
}
+ Service['vsftpd']->Service['xinetd']
}
}