Signed-off-by: Stephen Gran <steve@lobefin.net>
--- /dev/null
+define munin::conf (
+ $ensure=present,
+ $content='',
+ $source=''
+) {
+
+ include munin
+
+ case $ensure {
+ present: {
+ if ! ($source or $content) {
+ fail ( "No configuration found for ${name}" )
+ }
+ }
+ absent: {}
+ default: { fail ( "Unknown ensure value: '$ensure'" ) }
+ }
+
+ file { "/etc/munin/plugin-conf.d/${name}":
+ ensure => $ensure,
+ require => Package['munin-node'],
+ notify => Service['munin-node'],
+ }
+}
notify => Service['vsftpd']
}
- munin::check { 'vsftpd': }
+ munin::check { "vsftpd-${name}":
+ ensure => absent
+ }
munin::check { 'ps_vsftpd':
script => 'ps_'
}
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,
--- /dev/null
+[vsftpd-<%= scope.lookupvar('ftpsite') %>]
+user root
+env.logfile /var/log/ftp/<%= scope.lookupvar('ftpsite') %>.log