puppet-mediawiki/manifests/app.pp
Jeremy Stanley 43b131e06d Conditionally define the default extension source
Since $type and $source are both class parameters, we can't
interpolate $type in the default definition for $source. Instead
redefine $source inside the resource if it's unchanged from the
resource default.

Also make the contents of /src/mediawiki/w require the vcsrepo
resource for it. Early creation of the directory causes vcsrepo to
fail to clone into it.

Change-Id: I9b447173d4966f03a195825047cf25afc1a4afd6
2016-09-07 19:29:00 +00:00

27 lines
719 B
Puppet

# Class: mediawiki::app
#
class mediawiki::app ($revision = 'origin/REL1_27'){
vcsrepo { '/srv/mediawiki/w':
ensure => present,
provider => git,
source => 'https://gerrit.wikimedia.org/r/p/mediawiki/core.git',
revision => $revision,
}
vcsrepo { '/srv/mediawiki/w/vendor':
ensure => present,
provider => git,
source => 'https://gerrit.wikimedia.org/r/p/mediawiki/vendor.git',
revision => $revision,
require => Vcsrepo['/srv/mediawiki/w'],
}
file { '/srv/mediawiki/w/cache':
ensure => directory,
recurse => true,
owner => 'www-data',
group => 'www-data',
require => Vcsrepo['/srv/mediawiki/w'],
}
}
# vim:sw=2:ts=2:expandtab:textwidth=79