Puppet Class: vsftpd
- Defined in:
- manifests/init.pp
Overview
This class configures a vsftpd server. It ensures that the appropriate files are in the appropriate places and synchronizes the external materials.
One thing to note is that local users are forced to SSL for security reasons.
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
# File 'manifests/init.pp', line 65
class vsftpd (
# SIMP options
Boolean $firewall = simplib::lookup('simp_options::firewall', { 'default_value' => false }),
Variant[Enum['simp'],Boolean] $pki = simplib::lookup('simp_options::pki', { 'default_value' => false }),
Boolean $tcpwrappers = simplib::lookup('simp_options::tcpwrappers', { 'default_value' => false }),
Simplib::Netlist $trusted_nets = simplib::lookup('simp_options::trusted_nets', { 'default_value' => ['127.0.0.1','::1'] }),
Boolean $haveged = simplib::lookup('simp_options::haveged', { 'default_value' => false }),
Array[String] $cipher_suite = simplib::lookup('simp_options::openssl::cipher_suite', { 'default_value' => ['DEFAULT','!MEDIUM'] }),
String $package_ensure = simplib::lookup('simp_options::package_ensure', { 'default_value' => 'installed' }),
# vsftpd.conf options
Boolean $manage_user = true,
Boolean $manage_group = true,
Simplib::Port $ftp_data_port = 20,
Optional[Simplib::IP::V4] $listen_address = undef,
Boolean $listen_ipv4 = true, # listen config item in vsftpd.conf
Simplib::Port $listen_port = 21,
Boolean $local_enable = true,
Boolean $pasv_enable = true,
Optional[Simplib::Port] $pasv_max_port = undef,
Optional[Simplib::Port] $pasv_min_port = undef,
Boolean $ssl_enable = true,
Boolean $require_ssl_reuse = true,
Boolean $userlist_deny = true,
Boolean $userlist_enable = true,
Array[String] $user_list = ['root','bin','daemon','adm','lp','sync','shutdown','halt','mail','news','uucp','operator','games','nobody'],
String $pam_service_name = 'vsftpd',
Boolean $validate_cert = true,
Integer $vsftpd_gid = 50,
String $vsftpd_group = 'ftp',
Integer $vsftpd_uid = 14,
String $vsftpd_user = 'ftp',
) {
if $haveged and $ssl_enable {
simplib::assert_optional_dependency($module_name, 'simp/haveged')
include 'haveged'
}
include 'vsftpd::users'
include 'vsftpd::install'
include 'vsftpd::config'
include 'vsftpd::service'
Class['vsftpd::users']
-> Class['vsftpd::install']
-> Class['vsftpd::config']
~> Class['vsftpd::service']
-> Class['vsftpd']
if $firewall {
include 'vsftpd::config::firewall'
}
if $tcpwrappers {
include 'vsftpd::config::tcpwrappers'
}
}
|