Added define for installing moin packages, install CollabBase from gwiki repo
This commit is contained in:
parent
b495db3afe
commit
c260eb5c8b
1 changed files with 45 additions and 12 deletions
|
@ -243,18 +243,6 @@ class wiki::collab::base {
|
|||
require => File["/srv/wikis/collab/underlay"],
|
||||
before => Exec["collab-create collab collab"],
|
||||
}
|
||||
if $wiki::moin::moin_package =~ /^moin-1\.9/ {
|
||||
$underlay_package = "/srv/wikis/collab/underlay/pages/LanguageSetup/attachments/English--all_pages.zip"
|
||||
exec { "collab-install-underlay":
|
||||
user => "collab",
|
||||
path => "/bin:/usr/bin:/sbin:/usr/sbin",
|
||||
environment => "PYTHONPATH=/srv/wikis/collab/wikis/collab/config",
|
||||
command => "/bin/sh -c 'umask 007; python ${::pythonsitedir}/MoinMoin/packages.py i ${underlay_package}'",
|
||||
refreshonly => true,
|
||||
subscribe => Exec["collab-copy-underlay"],
|
||||
require => Exec["collab-account-create -f -r collab"]
|
||||
}
|
||||
}
|
||||
|
||||
file { "/srv/wikis/collab/config/collabfarm.py":
|
||||
ensure => present,
|
||||
|
@ -362,6 +350,16 @@ class wiki::collab::base {
|
|||
before => Cron["collab-htaccess"],
|
||||
}
|
||||
|
||||
if $wiki::moin::moin_package =~ /^moin-1\.9/ {
|
||||
wiki::collab::package { "moin-English--all_pages.zip":
|
||||
source => "/srv/wikis/collab/underlay/pages/LanguageSetup/attachments/English--all_pages.zip",
|
||||
}
|
||||
}
|
||||
|
||||
wiki::collab::package { "moin-CollabBase.zip":
|
||||
source => "/usr/local/src/graphingwiki/collab/packages/CollabBase.zip",
|
||||
}
|
||||
|
||||
cron { "collab-htaccess":
|
||||
ensure => present,
|
||||
command => $operatingsystem ? {
|
||||
|
@ -422,3 +420,38 @@ class wiki::collab::ramcache {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
# Install moin package.
|
||||
#
|
||||
# === Parameters
|
||||
#
|
||||
# $name:
|
||||
# Package name.
|
||||
# $source:
|
||||
# Package file source.
|
||||
# $config:
|
||||
# Path to collab instance config dir.
|
||||
# Defaults to "/srv/wikis/collab/wikis/collab/config".
|
||||
#
|
||||
define wiki::collab::package($source, $config="/srv/wikis/collab/wikis/collab/config") {
|
||||
|
||||
file { "/usr/local/src/${name}":
|
||||
ensure => present,
|
||||
mode => "0644",
|
||||
owner => "root",
|
||||
group => "root",
|
||||
source => $source,
|
||||
notify => Exec["collab-install-${name}"],
|
||||
}
|
||||
|
||||
exec { "collab-install-${name}":
|
||||
user => "collab",
|
||||
path => "/bin:/usr/bin:/sbin:/usr/sbin",
|
||||
environment => "PYTHONPATH=${config}",
|
||||
command => "/bin/sh -c 'umask 007; python ${::pythonsitedir}/MoinMoin/packages.py i /usr/local/src/${name}'",
|
||||
refreshonly => true,
|
||||
require => Exec["collab-account-create -f -r collab"]
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue