Puppet Class: profile::releases::mediawiki::security

Defined in:
modules/profile/manifests/releases/mediawiki/security.pp

Overview

releases.wikimedia.org/mediawiki sync MediaWiki security patches between releases* servers

Parameters:

  • deployment_server (Stdlib::Fqdn) (defaults to: lookup('deployment_server'))
  • primary_server (Stdlib::Fqdn) (defaults to: lookup('releases_server'))
  • secondary_servers (Array[Stdlib::Fqdn]) (defaults to: lookup('releases_servers_failover'))


3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'modules/profile/manifests/releases/mediawiki/security.pp', line 3

class profile::releases::mediawiki::security (
    Stdlib::Fqdn $deployment_server = lookup('deployment_server'),
    Stdlib::Fqdn $primary_server = lookup('releases_server'),
    Array[Stdlib::Fqdn] $secondary_servers = lookup('releases_servers_failover'),
){

    $all_secondary_servers = join($secondary_servers, ' ')
    $all_releases_servers = "${primary_server} ${all_secondary_servers}"
    $all_releases_servers_array = split($all_releases_servers, ' ')

    $all_releases_servers_array.each |String $releases_server| {
        rsync::quickdatacopy { "srv-patches-${releases_server}":
            ensure      => present,
            auto_sync   => true,
            delete      => true,
            source_host => $deployment_server,
            dest_host   => $releases_server,
            module_path => '/srv/patches',
        }
    }
}