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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1074 - (hide annotations) (download)
Tue Feb 15 00:48:24 2011 UTC (13 years, 6 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 misc 1053 class phpbb {
2 misc 1073 $database = "phpbb"
3     $user = "phpbb"
4 misc 1053
5     include apache::mod_php
6     include mysql
7    
8 dmorgan 1060 package { ["php-gd","php-xml","php-zlib","php-ftp","php-magickwand" ] :
9 misc 1053 ensure => installed
10     }
11    
12     # TODO ldap account configuration
13    
14 misc 1074 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 misc 1053
22 misc 1074 # 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 misc 1053 # TODO git checkout
37    
38 misc 1072 $pgsql_password = extlookup("phpbb_pgsql",'x')
39 misc 1073 @@postgresql::user { $user:
40 misc 1072 password => $pgsql_password,
41     }
42 misc 1053
43 misc 1073 @@postgresql::database { $database:
44 misc 1072 description => "Phpbb database",
45 misc 1073 user => $user,
46     require => Postgresql::User[$user]
47 misc 1072 }
48 misc 1053 }

  ViewVC Help
Powered by ViewVC 1.1.30