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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
class mgapeople(
$site_name = 'people.mageia.org',
$groupbase = 'ou=Group,dc=mageia,dc=org',
$ldap_server,
$binddn,
$bindpw,
$vhost,
$vhostdir
){
$mgapeople_login = 'mgapeople'
$bindpw_file = '/etc/mgapeople.ldapsecret'
group { $mgapeople_login:
ensure => present,
}
user { $mgapeople_login:
ensure => present,
comment => 'mgapeople user',
home => "/var/lib/${mgapeople_login}",
managehome => true,
gid => $mgapeople_login,
}
file { $bindpw_file:
ensure => present,
owner => $mgapeople_login,
group => $mgapeople_login,
mode => '0600',
content => $bindpw,
}
package { 'mgapeople':
ensure => installed,
}
file {'/etc/mgapeople.conf':
ensure => present,
owner => root,
group => root,
mode => '0644',
content => template('mgapeople/mgapeople.conf'),
require => Package['mgapeople'],
}
file { $vhostdir:
ensure => directory,
owner => $mgapeople_login,
group => $mgapeople_login,
mode => '0755',
}
apache::vhost::base { $vhost:
location => $vhostdir,
require => File[$vhostdir],
}
}
# vim: sw=2
|