Puppet Class: pureftpd::config::ldap

Inherits:
pureftpd::params
Defined in:
manifests/config/ldap.pp

Overview

Class: pureftpd::config::ldap

Manages the ‘pureftpd-ldap.conf` file. This class should be considered private.

Parameters:

  • ldapserver (Any) (defaults to: undef)
  • ldapport (Any) (defaults to: undef)
  • ldapbinddn (Any) (defaults to: undef)
  • ldapbindpw (Any) (defaults to: undef)
  • ldapbasedn (Any) (defaults to: undef)
  • ldapfilter (Any) (defaults to: undef)
  • ldaphomedir (Any) (defaults to: undef)
  • ldapversion (Any) (defaults to: undef)
  • ldapdefaultuid (Any) (defaults to: undef)
  • ldapforcedefaultuid (Any) (defaults to: undef)
  • ldapdefaultgid (Any) (defaults to: undef)
  • ldapforcedefaultgid (Any) (defaults to: undef)
  • ldapusetls (Any) (defaults to: undef)
  • ldapauthmethod (Any) (defaults to: undef)


7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# File 'manifests/config/ldap.pp', line 7

class pureftpd::config::ldap (
  $ldapserver          = undef,
  $ldapport            = undef,
  $ldapbinddn          = undef,
  $ldapbindpw          = undef,
  $ldapbasedn          = undef,
  $ldapfilter          = undef,
  $ldaphomedir         = undef,
  $ldapversion         = undef,
  $ldapdefaultuid      = undef,
  $ldapforcedefaultuid = undef,
  $ldapdefaultgid      = undef,
  $ldapforcedefaultgid = undef,
  $ldapusetls          = undef,
  $ldapauthmethod      = undef,
) inherits pureftpd::params {

  # options taken from pure-ftpd-1.0.30/src/log_ldap_p.h
  # XXX The options LDAPForceDefaultUID & LDAPForceDefaultGID are non-mainline
  # additions to pure-ftpd.  It is hoped that these will be merged into a
  # future offical release.
  # https://github.com/jhoblitt/pure-ftpd/commit/bb03ca57fb087bb03a6c8a69fe160e87c0d9c5e8
  $conf_options = [
    'LDAPServer',
    'LDAPPort',
    'LDAPBindDN',
    'LDAPBindPW',
    'LDAPBaseDN',
    'LDAPFilter',
    'LDAPHomeDir',
    'LDAPVersion',
    'LDAPDefaultUID',
    'LDAPForceDefaultUID',
    'LDAPDefaultGID',
    'LDAPForceDefaultGID',
    'LDAPUseTLS',
    'LDAPAuthMethod',
  ]

  file { $pureftpd::params::ldap_conf_path:
    ensure  => file,
    content => template("${module_name}/${pureftpd::params::ldap_conf_erb}"),
    owner   => 'root',
    group   => 'root',
    mode    => '0644',
  }
}