Defined Type: mediawiki::maintenance
- Defined in:
- puppet/modules/mediawiki/manifests/maintenance.pp
Overview
Define: mediawiki::maintenance
This resource type represents a MediaWiki maintenance script that needs to be run. This resource will alwyas run the named script as the www-data user and require that all settings files are provisioned and database updates have been run.
It is a wrapper around exec that ensures that the MediaWiki settings files are in place before the script runs.
It can either be a single-wiki or all-wiki script. The full command is specified in the format exec accepts.
See Puppet's built-in exec resource for parameter documentation.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'puppet/modules/mediawiki/manifests/maintenance.pp', line 15
define mediawiki::maintenance(
$command,
$creates = undef,
$cwd = undef,
$environment = undef,
$group = undef,
$logoutput = undef,
$onlyif = undef,
$path = undef,
$refresh = undef,
$refreshonly = undef,
$timeout = undef,
$unless = undef,
) {
exec { $title:
command => $command,
creates => $creates,
cwd => $cwd,
environment => $environment,
group => $group,
logoutput => $logoutput,
onlyif => $onlyif,
path => $path,
refresh => $refresh,
refreshonly => $refreshonly,
timeout => $timeout,
unless => $unless,
# Maintenance scripts always run as the www-data user
user => 'www-data',
# Always wait for the databases to get setup
require => Exec['update_all_databases'],
}
# Make sure all Puppet-defined PHP settings are in place before
# running maintenance scripts.
Mediawiki::Settings <| |> -> Mediawiki::Maintenance <| |>
}
|