Added variable $wiki::moin::shared pointing to moin's static files

This commit is contained in:
Ossi Salmi 2012-01-30 17:09:39 +02:00
parent 6816871c1c
commit e1ba92e9ef

View file

@ -42,12 +42,12 @@ class wiki::moin {
require => Util::Patch["/usr/local/src/moin"],
}
$htdocs = $operatingsystem ? {
"ubuntu" => "/usr/local/share/moin/htdocs",
default => "/usr/share/moin/htdocs",
$shared = $operatingsystem ? {
"ubuntu" => "/usr/local/share/moin",
default => "/usr/share/moin",
}
file { "${htdocs}/.htaccess":
file { "${shared}/htdocs/.htaccess":
ensure => present,
mode => 0644,
owner => "root",
@ -214,11 +214,8 @@ class wiki::collab::base {
user => collab,
group => collab,
path => "/bin:/usr/bin:/sbin:/usr/sbin",
cwd => $operatingsystem ? {
ubuntu => "/usr/local/share/moin/underlay",
default => "/usr/share/moin/underlay",
},
command => "cp -R * /srv/wikis/collab/underlay && chmod -R g=u,o-rwx /srv/wikis/collab/underlay/*",
cwd => "${wiki::moin::shared}/underlay",
command => "cp -R pages /srv/wikis/collab/underlay && chmod -R g=u,o-rwx /srv/wikis/collab/underlay",
creates => "/srv/wikis/collab/underlay/pages",
require => File["/srv/wikis/collab/underlay"],
}
@ -313,10 +310,7 @@ class wiki::collab::base {
file { "/srv/www/https/${name}/moin_static":
ensure => link,
target => $operatingsystem ? {
ubuntu => "/usr/local/share/moin/htdocs",
default => "/usr/share/moin/htdocs",
},
target => "${wiki::moin::shared}/htdocs",
require => File["/srv/www/https/${name}"],
}
}