@@ -3,48 +3,128 @@ Puppet pureftpd Module
3
3
4
4
[ ![ Build Status] ( https://travis-ci.org/jhoblitt/puppet-pureftpd.png )] ( https://travis-ci.org/jhoblitt/puppet-pureftpd )
5
5
6
+ #### Table of Contents
7
+
8
+ 1 . [ Overview] ( #overview )
9
+ 2 . [ Description] ( #description )
10
+ 3 . [ Usage] ( #usage )
11
+ 4 . [ Limitations] ( #limitations )
12
+ * [ Tested Platforms] ( #tested-platforms )
13
+ 5 . [ Support] ( #support )
14
+
15
+
16
+ Overview
17
+ --------
18
+
19
+ Manages the pure-ftpd package with comprehensive configuration support'
20
+
6
21
7
22
Description
8
23
-----------
9
24
10
- This is a puppet module for installation and configuration of the ` pure-ftpd `
11
- software.
25
+ This is a puppet module for installation and configuration of the
26
+ [ ` pure-ftpd ` ] ( http://www.pureftpd.org/project/pure-ftpd ) software package. It
27
+ aims to support all valid configuration file values.
12
28
29
+ ### Forked
13
30
14
- Examples
15
- --------
31
+ This module started out as a fork of
32
+ [ ` 5Ub-Z3r0/puppet-pureftpd ` ] ( https://github.com/5Ub-Z3r0/puppet-pureftpd ) but
33
+ has been so heavily redesigned over time that it's probably not reasonable to
34
+ blame any of the design or implementation on
35
+ [ ` 5Ub-Z3r0 ` ] ( https://github.com/5Ub-Z3r0 ) . It would also be exceptionally
36
+ difficult to re-unify the two modules due to fundamental API differences.
37
+
38
+ The original module was marked as being licensed under ` GPLv3 ` in comments and
39
+ no ` LICENSE ` file was present. Very little to none of the original module code
40
+ remains in the present version of this module. All contributions by `Joshua
41
+ Hoblitt` are licensed under ` Apache License, Version 2.0`. You should consult
42
+ with a lawyer for a legal opinion as to weather or not this module constitutes
43
+ a derived work.
44
+
45
+
46
+ Usage
47
+ -----
48
+
49
+ In general, any valid ` pure-ftpd ` configuration file option (including the
50
+ separate configuration files for auth modules) can be set by creating a key in
51
+ the appropriate class parameter hash but with the name of the option
52
+ transliterated to * lowercase* . The values passed to that option are handled
53
+ completely as raw strings but this module. No effort is made to handle
54
+ ` boolean ` or ` integer ` values as ` pure-ftpd ` itself is not consistent in how it
55
+ handles these values.
56
+
57
+ For example, if you wanted to create the configuration option example below in the file ` /etc/pure-ftpd/pure-ftpd.conf ` ,
58
+
59
+ ChrootEveryone yes
60
+
61
+ You would declare it like this to the puppet module:
16
62
17
- ### Basic
63
+ class { 'pureftpd':
64
+ config => {
65
+ chrooteveryone => 'yes',
66
+ }
67
+ }
68
+
69
+ The notable exception to that rule is for these ` pure-ftpd.conf ` options, which
70
+ should not need to be manually declared. Passing a hash of configuration
71
+ options to the appropriate class parameter automatically defines these options
72
+ for you.
73
+
74
+ LDAPConfigFile
75
+ MySQLConfigFile
76
+ PGSQLConfigFile
77
+
78
+
79
+ ### ` pure-ftpd ` Options
80
+
81
+ The ` pure-ftpd ` documentation does not provide a canonical list of all possible
82
+ configuration options with examples. However, there are number of "HOW TO"s on
83
+ the official [ documentation] ( http://www.pureftpd.org/project/pure-ftpd/doc ) web
84
+ page.
18
85
19
- Install ` pure-ftpd ` with an empty ` pure-ftpd.conf ` config file (accepting all
20
- defaults) and start ` pure-ftpd ` as a stand alone daemon.
86
+ There is a list of command line switches in the distribution's
87
+ [ ` README ` ] ( https://github.com/jedisct1/pure-ftpd/blob/master/README ) that
88
+ should all have ` pure-ftpd.conf ` option analogs.
89
+
90
+ Here are some useful sources for discovering configuration parameters with examples:
91
+
92
+ * [ ` pure-ftpd.conf ` ] ( https://github.com/jedisct1/pure-ftpd/blob/master/configuration-file/pure-ftpd.conf.in )
93
+ * [ ` pureftpd-ldap.conf ` ] ( https://github.com/jedisct1/pure-ftpd/blob/master/pureftpd-ldap.conf )
94
+ * [ ` pureftpd-mysql.conf ` ] ( https://github.com/jedisct1/pure-ftpd/blob/master/pureftpd-mysql.conf )
95
+ * [ ` pureftpd-pgsql.conf ` ] ( https://github.com/jedisct1/pure-ftpd/blob/master/pureftpd-pgsql.conf )
96
+
97
+ ### Basic Usage
98
+
99
+ Install the ` pure-ftpd ` package with an empty ` pure-ftpd.conf ` config file
100
+ (accepting all defaults) and start ` pure-ftpd ` as a stand alone daemon.
21
101
22
102
class { 'pureftpd': }
23
103
24
- ### Selinux support
104
+ ### SELinux Support
25
105
26
106
class { 'pureftpd':
27
107
use_selinux => true,
28
108
}
29
109
30
- ### Setting configuration options
110
+ ### Setting Configuration Options
111
+
112
+ Options for ` pure-ftpd.conf ` ] should be passed into the ` config ` class
113
+ parameter as a hash.
31
114
32
115
class { 'pureftpd':
33
- use_selinux => true,
34
116
config => {
35
117
ipv4only => 'Yes',
36
118
passiveportrange => '49999:59999',
37
119
},
38
120
}
39
121
40
- ### Enabling LDAP authentication
122
+ ### Enabling LDAP Authentication
123
+
124
+ Options for ` pureftpd-ldap.conf ` ] should be passed into the ` config_ldap ` class
125
+ parameter as a hash.
41
126
42
127
class { 'pureftpd':
43
- use_selinux => true,
44
- config => {
45
- ipv4only => 'Yes',
46
- passiveportrange => '49999:59999',
47
- },
48
128
config_ldap => {
49
129
ldapserver => 'ldap.example.com',
50
130
ldapauthmethod => 'PASSWORD',
@@ -62,14 +142,43 @@ defaults) and start `pure-ftpd` as a stand alone daemon.
62
142
},
63
143
}
64
144
65
- ### Enabling PGSQL authentication
145
+ ### Enabling MYSQL Authentication
146
+
147
+ Options for ` pureftpd-mysql.conf ` ] should be passed into the ` config_mysql `
148
+ class parameter as a hash.
66
149
67
150
class { 'pureftpd':
68
- use_selinux => true,
69
- config => {
70
- ipv4only => 'Yes',
71
- passiveportrange => '49999:59999',
151
+ config_mysql => {
152
+ mysqlserver => 'localhost'
153
+ mysqlport => '3306'
154
+ mysqlsocket => '/tmp/mysql.sock'
155
+ mysqluser => 'root'
156
+ mysqlpassword => 'rootpw'
157
+ mysqldatabase => 'pureftpd'
158
+ mysqlcrypt => 'cleartext'
159
+ mysqltransactions => 'On'
160
+ mysqlgetpw => 'SELECT Password FROM users WHERE User="\L"'
161
+ mysqlgetuid => 'SELECT Uid FROM users WHERE User="\L"'
162
+ mysqldefaultuid => '1000'
163
+ mysqlgetgid => 'SELECT Gid FROM users WHERE User="\L"'
164
+ mysqldefaultgid => '1000'
165
+ mysqlgetdir => 'SELECT Dir FROM users WHERE User="\L"'
166
+ mysqlforcetildeexpansion => '0'
167
+ mysqlgetqtafs => 'SELECT QuotaFiles FROM users WHERE User="\L"'
168
+ mysqlgetqtasz => 'SELECT QuotaSize FROM users WHERE User="\L"'
169
+ mysqlgetratioul => 'SELECT ULRatio FROM users WHERE User="\L"'
170
+ mysqlgetratiodl => 'SELECT DLRatio FROM users WHERE User="\L"'
171
+ mysqlgetbandwidthul => 'SELECT ULBandwidth FROM users WHERE User="\L"'
172
+ mysqlgetbandwidthdl => 'SELECT DLBandwidth FROM users WHERE User="\L"'
72
173
},
174
+ }
175
+
176
+ ### Enabling PGSQL Authentication
177
+
178
+ Options for ` pureftpd-pgsql.conf ` ] should be passed into the ` config_pgsql `
179
+ class parameter as a hash.
180
+
181
+ class { 'pureftpd':
73
182
config_pgsql => {
74
183
pgsqlserver => 'localhost',
75
184
pgsqlport => '5432',
@@ -91,3 +200,34 @@ defaults) and start `pure-ftpd` as a stand alone daemon.
91
200
pgsqlgetbandwidthdl => 'SELECT DLBandwidth FROM users WHERE User=\'\L\'',
92
201
},
93
202
}
203
+
204
+ ### Canonical Example
205
+
206
+ Limitations
207
+ -----------
208
+
209
+ At present, this module is only capable of installing the ` pure-ftpd ` package
210
+ and enabling it as a daemonized service. The lack of uninstallation support is
211
+ probably a bug.
212
+
213
+ Only support for ` $::osfamily == 'RedHat' ` has been implemented. Adding
214
+ support for other platform should be trivial but needs to involve full up
215
+ integration testing.
216
+
217
+ The supported configuration file values were discovered via code inspection of
218
+ the ` pure-ftpd ` ` v1.0.31 ` release. There are possibly new configuration
219
+ values that have been introduced it subsequent releases. Any configuration
220
+ values present in a ` pure-ftpd ` but not supported by this module should be
221
+ considered a bug.
222
+
223
+ ### Tested Platforms
224
+
225
+ * el6.x
226
+
227
+
228
+ Support
229
+ -------
230
+
231
+ Please log tickets and issues at
232
+ [ github] ( https://github.com/jhoblitt/puppet-pureftpd/issues )
233
+
0 commit comments