/[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 1074 - (show annotations) (download)
Tue Feb 15 00:48:24 2011 UTC (13 years, 2 months ago) by misc
File size: 1261 byte(s)
add a define to manage part of the phpbb config from puppet by directly changing the configuration in the db
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 ldap account configuration
23 # ldap_user
24 # ldap_server
25 # ldap_password ldap_base_dn cookie_domain
26 # board_contact
27 #
28 define phpbb_config($value) {
29 exec { "/usr/local/bin/phpbb_apply_config.pl $name":
30 user => root,
31 environment => "PGDATABASE=$database PGUSER=$user PGPASSWORD=$password PGHOST=pgsql.$domain VALUE=$value",
32 require => File["/usr/local/bin/phpbb_apply_config.pl"],
33 }
34 }
35
36 # TODO git checkout
37
38 $pgsql_password = extlookup("phpbb_pgsql",'x')
39 @@postgresql::user { $user:
40 password => $pgsql_password,
41 }
42
43 @@postgresql::database { $database:
44 description => "Phpbb database",
45 user => $user,
46 require => Postgresql::User[$user]
47 }
48 }

  ViewVC Help
Powered by ViewVC 1.1.30