Puppet Class: profile::releases::mediawiki::private
- Defined in:
- modules/profile/manifests/releases/mediawiki/private.pp
Overview
sync MediaWiki private files between releases* servers
2 3 4 5 6 7 8 9 10 11 12 13 14 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 |
# File 'modules/profile/manifests/releases/mediawiki/private.pp', line 2
class profile::releases::mediawiki::private (
Stdlib::Fqdn $deployment_server = lookup('deployment_server'),
Stdlib::Fqdn $primary_server = lookup('releases_server'),
Array[Stdlib::Fqdn] $secondary_servers = lookup('releases_servers_failover'),
){
# server-agnostic rsync on the primary releases server
rsync::quickdatacopy { 'srv-mediawiki-private-primary':
ensure => present,
auto_sync => false,
delete => true,
source_host => $deployment_server,
dest_host => $primary_server,
module_path => '/srv/mediawiki-staging/private',
}
# if the primary changes, absent the hostname-based rsync
rsync::quickdatacopy { "srv-mediawiki-private-${primary_server}":
ensure => absent,
auto_sync => false,
delete => true,
source_host => $deployment_server,
dest_host => $primary_server,
module_path => '/srv/mediawiki-staging/private',
}
$secondary_servers.each |Stdlib::Fqdn $secondary_server| {
unless $deployment_server == $secondary_server {
rsync::quickdatacopy { "srv-mediawiki-private-${secondary_server}":
ensure => present,
auto_sync => false,
delete => true,
source_host => $deployment_server,
dest_host => $secondary_server,
module_path => '/srv/mediawiki-staging/private',
}
}
}
}
|