1 |
class mediawiki { |
class mediawiki { |
2 |
|
class config($pgsql_password, $secretkey, $ldap_password) { |
3 |
|
} |
4 |
|
|
5 |
class base { |
class base { |
6 |
|
|
7 |
$root = "/srv/wiki/" |
$root = "/srv/wiki/" |
26 |
|
|
27 |
$user = "mediawiki" |
$user = "mediawiki" |
28 |
|
|
|
$pgsql_password = extlookup("mediawiki_pgsql",'x') |
|
29 |
postgresql::remote_user { $user: |
postgresql::remote_user { $user: |
30 |
password => $pgsql_password, |
password => $config::pgsql_password, |
31 |
} |
} |
32 |
|
|
33 |
# TODO create the ldap user |
# TODO create the ldap user |
61 |
$wiki_root = "$mediawiki::base::root/$path" |
$wiki_root = "$mediawiki::base::root/$path" |
62 |
$db_name = "mediawiki_$name" |
$db_name = "mediawiki_$name" |
63 |
$db_user = "$mediawiki::base::user" |
$db_user = "$mediawiki::base::user" |
64 |
$db_password = "$mediawiki::base::pgsql_password" |
$db_password = "$mediawiki::config::pgsql_password" |
65 |
$secret_key = extlookup("mediawiki_secretkey",'x') |
$secret_key = "$mediawiki::config::secretkey" |
66 |
|
|
67 |
file { "$wiki_root": |
file { "$wiki_root": |
68 |
ensure => directory |
ensure => directory |
85 |
refreshonly => true, |
refreshonly => true, |
86 |
onlyif => "test -d $wiki_root/config", |
onlyif => "test -d $wiki_root/config", |
87 |
} |
} |
88 |
$ldap_password = extlookup('mediawiki_ldap','x') |
$ldap_password = $config::ldap_password |
89 |
|
|
90 |
file { "$wiki_root/LocalSettings.php": |
file { "$wiki_root/LocalSettings.php": |
91 |
ensure => present, |
ensure => present, |