summaryrefslogtreecommitdiff
path: root/manifests/init.pp
blob: 1b5b0fa97e4d048ba3a181cfee8f3705bf88e20b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
class phpldapadmin (
  String $servername = 'My LDAP Server',
  String $server_uri = '127.0.0.1',
  Integer[0, 65535] $port = 389,
  Boolean $debug_mode = false,
  String $tmpdir = '/tmp',
  Optional[String] $timezone = undef,
  Hash[String, String] $friendly_attrs = {
    'facsimileTelephoneNumber' => 'Fax',
    'gid'                      => 'Group',
    'mail'                     => 'Email',
    'telephoneNumber'          => 'Telephone',
    'uid'                      => 'User Name',
    'userPassword'             => 'Password',
  },
  Enum['cookie', 'session', 'http', 'config', 'sasl', 'sasl_external'] $auth_type = 'session',
) {
  ensure_packages(['phpldapadmin'])

  # TODO also ensure writable by web server
  file { $tmpdir:
    ensure => directory,
  }

  file { '/etc/webapps/phpldapadmin/config.php':
    content => epp("${module_name}/config.php.epp"),
  }

}