/[adm]/puppet/modules/phpbb/manifests/init.pp
ViewVC logotype

Contents of /puppet/modules/phpbb/manifests/init.pp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1076 - (show annotations) (download)
Tue Feb 15 01:13:34 2011 UTC (13 years, 7 months ago) by misc
File size: 1628 byte(s)
- fix error in declaration

1 class phpbb {
2 $database = "phpbb"
3 $user = "phpbb"
4
5 include apache::mod_php
6 include mysql
7
8 package { ["php-gd","php-xml","php-zlib","php-ftp","php-magickwand" ] :
9 ensure => installed
10 }
11
12 # TODO ldap account configuration
13
14 file { "/usr/local/bin/phpbb_apply_config.pl":
15 ensure => present,
16 owner => root,
17 group => root,
18 mode => 755,
19 source => 'puppet:///modules/phpbb/phpbb_apply_config.pl',
20 }
21
22 # TODO phpbb config
23 # cookie_domain
24 # board_contact
25 #
26 define phpbb_config($value) {
27 exec { "/usr/local/bin/phpbb_apply_config.pl $name":
28 user => root,
29 environment => "PGDATABASE=$database PGUSER=$user PGPASSWORD=$password PGHOST=pgsql.$domain VALUE=$value",
30 require => File["/usr/local/bin/phpbb_apply_config.pl"],
31 }
32 }
33
34 phpbb_config { "ldap_user":
35 value => "cn=phpbb-friteuse,ou=System Accounts,$dc_suffix",
36 }
37
38 phpbb_config { "ldap_server":
39 value => "ldap.$domain",
40 }
41
42 $ldap_password = extlookup("phpbb_ldap",'x')
43 phpbb_config { "ldap_password":
44 value => $ldap_password,
45 }
46
47 phpbb_config { "ldap_base_dn":
48 value => "ou=People,$dc_suffix",
49 }
50
51
52
53 # TODO git checkout of the code
54
55 # TODO phpbb database configuration
56 $pgsql_password = extlookup("phpbb_pgsql",'x')
57 @@postgresql::user { $user:
58 password => $pgsql_password,
59 }
60
61 @@postgresql::database { $database:
62 description => "Phpbb database",
63 user => $user,
64 require => Postgresql::User[$user]
65 }
66 }

  ViewVC Help
Powered by ViewVC 1.1.30