Skip to content

Commit 9aa1ad3

Browse files
author
Joshua Hoblitt
committed
add ldap/mysql/pgsql parameters to pureftpd::config
As a replacement for `$default_auth` used the templates
1 parent 1296a7b commit 9aa1ad3

File tree

2 files changed

+6
-15
lines changed

2 files changed

+6
-15
lines changed

manifests/config.pp

+3-12
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@
7979
$fortunesfile = false,
8080
$dontresolve = true,
8181
$maxidletime = '15',
82+
$ldapconfigfile = false,
83+
$mysqlconfigfile = false,
84+
$pgsqlconfigfile = false,
8285
$pamauthentication = true,
8386
$unixauthentication = false,
8487
$limitrecursion = '10000 8',
@@ -117,18 +120,6 @@
117120
$ipv6only = false,
118121
) inherits pureftpd::params {
119122

120-
$default_auth = 'unix'
121-
122-
# if ($motd_file != undef) {
123-
# file { '/etc/motd.pureftpd':
124-
# ensure => file,
125-
# source => $motd_file,
126-
# owner => 'root',
127-
# group => 'root',
128-
# mode => '0644'
129-
# }
130-
# }
131-
132123
file { "${pureftpd::params::config_dir}/pure-ftpd.conf":
133124
ensure => file,
134125
content => template("${module_name}/${::osfamily}/pure-ftpd.conf.erb"),

templates/RedHat/pure-ftpd.conf.erb

+3-3
Original file line numberDiff line numberDiff line change
@@ -115,18 +115,18 @@ MaxIdleTime <%= @maxidletime %>
115115

116116
# LDAP configuration file (see README.LDAP)
117117

118-
<% if default_auth != 'ldap' %># <% end -%>LDAPConfigFile /etc/pure-ftpd/pureftpd-ldap.conf
118+
<% if not @ldapconfigfile %># <% end -%>LDAPConfigFile /etc/pure-ftpd/pureftpd-ldap.conf
119119

120120

121121

122122
# MySQL configuration file (see README.MySQL)
123123

124-
<% if default_auth != 'mysql' %># <% end -%>MySQLConfigFile /etc/pure-ftpd/pureftpd-mysql.conf
124+
<% if not @mysqlconfigfile %># <% end -%>MySQLConfigFile /etc/pure-ftpd/pureftpd-mysql.conf
125125

126126

127127
# Postgres configuration file (see README.PGSQL)
128128

129-
<% if default_auth != 'pgsql' %># <% end -%>PGSQLConfigFile /etc/pure-ftpd/pureftpd-pgsql.conf
129+
<% if not @pgsqlconfigfile %># <% end -%>PGSQLConfigFile /etc/pure-ftpd/pureftpd-pgsql.conf
130130

131131

132132
# PureDB user database (see README.Virtual-Users)

0 commit comments

Comments
 (0)