Skip to content

Commit d178271

Browse files
author
Joshua Hoblitt
committed
s/\r\n/\n/g
1 parent 53b9f74 commit d178271

File tree

6 files changed

+351
-351
lines changed

6 files changed

+351
-351
lines changed

Modulefile

+21-21
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
name 'puppet-pureftpd'
2-
version '1.0.3'
3-
4-
author '5Ub-Z3r0'
5-
license 'GPL v3'
6-
project_page 'https://github.com/5Ub-Z3r0/puppet-pureftpd'
7-
source 'https://github.com/5Ub-Z3r0/puppet-pureftpd.git'
8-
summary 'Pure-FTPd module'
9-
description 'This module manages Pure-FTPd via Puppet.
10-
11-
It currently supports only RHEL, altough it should be easy to modify it to manage Debian-like systems.
12-
13-
Requirements:
14-
15-
* [Facter](http://www.puppetlabs.com/puppet/related-projects/facter/) 1.6.1 or greater (versions that support the osfamily fact)
16-
17-
Todo:
18-
- complete the config_mysql and config_pgsql defines
19-
'
20-
21-
## Add dependencies, if any:
1+
name 'puppet-pureftpd'
2+
version '1.0.3'
3+
4+
author '5Ub-Z3r0'
5+
license 'GPL v3'
6+
project_page 'https://github.com/5Ub-Z3r0/puppet-pureftpd'
7+
source 'https://github.com/5Ub-Z3r0/puppet-pureftpd.git'
8+
summary 'Pure-FTPd module'
9+
description 'This module manages Pure-FTPd via Puppet.
10+
11+
It currently supports only RHEL, altough it should be easy to modify it to manage Debian-like systems.
12+
13+
Requirements:
14+
15+
* [Facter](http://www.puppetlabs.com/puppet/related-projects/facter/) 1.6.1 or greater (versions that support the osfamily fact)
16+
17+
Todo:
18+
- complete the config_mysql and config_pgsql defines
19+
'
20+
21+
## Add dependencies, if any:

manifests/config_ldap.pp

+124-124
Original file line numberDiff line numberDiff line change
@@ -1,124 +1,124 @@
1-
# == Define: pureftpd::config
2-
#
3-
# This module manages the pure-ftpd configuration files with LDAP authentication
4-
#
5-
# === Parameters
6-
#
7-
# [*ldap_server*]
8-
# Mandatory, is the IP or FQDN of the LDAP server
9-
#
10-
# [*ldap_basedn*]
11-
# Mandatory, is the base DN of the LDAP tree where the users are stored
12-
# (e.g.: ou=People,dc=company,dc=com)
13-
#
14-
# [*ldap_filter*]
15-
# Mandatory, specifies a filter that can be used to filter out users
16-
# (e.g.: '(&(objectClass=posixAccount)(uid=\L))')
17-
#
18-
# [*ldap_port*]
19-
# Optional, defaults to 389
20-
# The server port where the ldap service listens
21-
#
22-
# [*ldap_authmethod*]
23-
# Mandatory, can either be BIND or password
24-
# Manages the authentication methof for the LDAP users.
25-
#
26-
# [*$ldap_binddn*]
27-
# Optional, defaults to "".
28-
# the binddn that will be used to connect to the tree; leave blank if LDAP
29-
# supports anonymous bind.
30-
#
31-
# [*ldap_bindpw*]
32-
# Optional, defaults to "".
33-
# the binddn pass that will be used to connect to the tree; leave blank if LDAP
34-
# supports anonymous bind.
35-
#
36-
# [*ldap_usetls*]
37-
# Optional, defaults to false.
38-
# Defines whether or not to use a TLS connection to the LDAP service.
39-
#
40-
# [*use_selinux*]
41-
# Optional, defaults to false.
42-
# Manages whether or not to enable selinux extensions.
43-
#
44-
# [*allow_anonymous*]
45-
# Optional, defaults to false.
46-
# Manages whether or not to allow anonymous users.
47-
#
48-
# [*allow_fxp*]
49-
# Optional, defaults to false.
50-
# Manages whether or not to allow the fxp protocol
51-
#
52-
# [*user_bandwidth*]
53-
# Optional, defaults to undef.
54-
# Defines the maximum bandwidth that the can be used, in the form
55-
# $kb_download:$kb_upload (e.g., 1800:1800).
56-
#
57-
# [*max_clients_number*]
58-
# Optional, defaults to 50.
59-
# Maximum number of simultaneous users that the server can manage.
60-
#
61-
# [*max_clients_per_ip*]
62-
# Optional, defaults to 8.
63-
# Maximum number of different clients that can come from a single IP
64-
#
65-
# [*umask*]
66-
# Optional, defaults to 133:022.
67-
# Specifies the user mask of the uploaded files/directories, in the form
68-
# $file_umask:$dir_umask (e.g., 177:077).
69-
#
70-
# [*min_uid*]
71-
# Optional, defaults to 500.
72-
# The minimum user id that can be accepted as an ftp user.
73-
#
74-
# [*allow_chmod*]
75-
# Optional, defaults to false.
76-
# Whether or not users are allowed to change ownerships of their files.
77-
#
78-
# [*use_tls*]
79-
# Optional, defaults to false.
80-
# Whether or not to accept tls connections in addition to normal ones.
81-
# TODO: Remember to place your server certificate in /etc/ssl/private/pure-ftpd.pem
82-
#
83-
# [*force_passive_ip*]
84-
# Optional, defaults to undef (not set)
85-
# Force an IP address in PASV/EPSV/SPSV replies
86-
#
87-
# [*motd_file*]
88-
# Optional, defaults to undef (use the dynamic provided file).
89-
# Manages the location of the server motd file, if any.
90-
#
91-
# === Examples
92-
#
93-
# pureftpd::config_ldap { 'ftp-server':
94-
# ldap_server => '192.168.100.10',
95-
# ldap_basedn => 'ou=Users,dc=company,dc=com',
96-
# ldap_filter => '(&(objectClass=posixAccount)(uid=\L))',
97-
# ldap_authmethod => 'BIND'
98-
# user_bandwidth => '1800:1800'
99-
# }
100-
#
101-
# === Authors
102-
#
103-
# 5Ub-Z3r0
104-
#
105-
class 'pureftpd::config_ldap' (
106-
$ldap_port = '389',
107-
$ldap_usetls = false,
108-
$ldap_server,
109-
$ldap_basedn,
110-
$ldap_binddn = '',
111-
$ldap_bindpw = '',
112-
$ldap_filter,
113-
$ldap_authmethod
114-
) {
115-
116-
file { "${pureftpd::params::config_dir}/pureftpd-ldap.conf":
117-
ensure => file,
118-
content => template("${module_name}/${::osfamily}/pureftpd-ldap.conf.erb"),
119-
owner => 'root',
120-
group => 'root',
121-
mode => '0644',
122-
notify => Service[$pureftpd::params::service_name]
123-
}
124-
}
1+
# == Define: pureftpd::config
2+
#
3+
# This module manages the pure-ftpd configuration files with LDAP authentication
4+
#
5+
# === Parameters
6+
#
7+
# [*ldap_server*]
8+
# Mandatory, is the IP or FQDN of the LDAP server
9+
#
10+
# [*ldap_basedn*]
11+
# Mandatory, is the base DN of the LDAP tree where the users are stored
12+
# (e.g.: ou=People,dc=company,dc=com)
13+
#
14+
# [*ldap_filter*]
15+
# Mandatory, specifies a filter that can be used to filter out users
16+
# (e.g.: '(&(objectClass=posixAccount)(uid=\L))')
17+
#
18+
# [*ldap_port*]
19+
# Optional, defaults to 389
20+
# The server port where the ldap service listens
21+
#
22+
# [*ldap_authmethod*]
23+
# Mandatory, can either be BIND or password
24+
# Manages the authentication methof for the LDAP users.
25+
#
26+
# [*$ldap_binddn*]
27+
# Optional, defaults to "".
28+
# the binddn that will be used to connect to the tree; leave blank if LDAP
29+
# supports anonymous bind.
30+
#
31+
# [*ldap_bindpw*]
32+
# Optional, defaults to "".
33+
# the binddn pass that will be used to connect to the tree; leave blank if LDAP
34+
# supports anonymous bind.
35+
#
36+
# [*ldap_usetls*]
37+
# Optional, defaults to false.
38+
# Defines whether or not to use a TLS connection to the LDAP service.
39+
#
40+
# [*use_selinux*]
41+
# Optional, defaults to false.
42+
# Manages whether or not to enable selinux extensions.
43+
#
44+
# [*allow_anonymous*]
45+
# Optional, defaults to false.
46+
# Manages whether or not to allow anonymous users.
47+
#
48+
# [*allow_fxp*]
49+
# Optional, defaults to false.
50+
# Manages whether or not to allow the fxp protocol
51+
#
52+
# [*user_bandwidth*]
53+
# Optional, defaults to undef.
54+
# Defines the maximum bandwidth that the can be used, in the form
55+
# $kb_download:$kb_upload (e.g., 1800:1800).
56+
#
57+
# [*max_clients_number*]
58+
# Optional, defaults to 50.
59+
# Maximum number of simultaneous users that the server can manage.
60+
#
61+
# [*max_clients_per_ip*]
62+
# Optional, defaults to 8.
63+
# Maximum number of different clients that can come from a single IP
64+
#
65+
# [*umask*]
66+
# Optional, defaults to 133:022.
67+
# Specifies the user mask of the uploaded files/directories, in the form
68+
# $file_umask:$dir_umask (e.g., 177:077).
69+
#
70+
# [*min_uid*]
71+
# Optional, defaults to 500.
72+
# The minimum user id that can be accepted as an ftp user.
73+
#
74+
# [*allow_chmod*]
75+
# Optional, defaults to false.
76+
# Whether or not users are allowed to change ownerships of their files.
77+
#
78+
# [*use_tls*]
79+
# Optional, defaults to false.
80+
# Whether or not to accept tls connections in addition to normal ones.
81+
# TODO: Remember to place your server certificate in /etc/ssl/private/pure-ftpd.pem
82+
#
83+
# [*force_passive_ip*]
84+
# Optional, defaults to undef (not set)
85+
# Force an IP address in PASV/EPSV/SPSV replies
86+
#
87+
# [*motd_file*]
88+
# Optional, defaults to undef (use the dynamic provided file).
89+
# Manages the location of the server motd file, if any.
90+
#
91+
# === Examples
92+
#
93+
# pureftpd::config_ldap { 'ftp-server':
94+
# ldap_server => '192.168.100.10',
95+
# ldap_basedn => 'ou=Users,dc=company,dc=com',
96+
# ldap_filter => '(&(objectClass=posixAccount)(uid=\L))',
97+
# ldap_authmethod => 'BIND'
98+
# user_bandwidth => '1800:1800'
99+
# }
100+
#
101+
# === Authors
102+
#
103+
# 5Ub-Z3r0
104+
#
105+
class 'pureftpd::config_ldap' (
106+
$ldap_port = '389',
107+
$ldap_usetls = false,
108+
$ldap_server,
109+
$ldap_basedn,
110+
$ldap_binddn = '',
111+
$ldap_bindpw = '',
112+
$ldap_filter,
113+
$ldap_authmethod
114+
) {
115+
116+
file { "${pureftpd::params::config_dir}/pureftpd-ldap.conf":
117+
ensure => file,
118+
content => template("${module_name}/${::osfamily}/pureftpd-ldap.conf.erb"),
119+
owner => 'root',
120+
group => 'root',
121+
mode => '0644',
122+
notify => Service[$pureftpd::params::service_name]
123+
}
124+
}

0 commit comments

Comments
 (0)