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 from the deployment server

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'))


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
41
42
43
44
# File 'modules/profile/manifests/releases/mediawiki/security.pp', line 4

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'),
){

    # server-agnostic rsync on the primary releases server
    rsync::quickdatacopy { 'srv-patches-releases-primary':
        ensure      => present,
        auto_sync   => true,
        delete      => true,
        source_host => $deployment_server,
        dest_host   => $primary_server,
        module_path => '/srv/patches',
        chown       => 'jenkins:705',
    }

    # if the primary changes, absent the hostname-based rsync
    rsync::quickdatacopy { "srv-patches-${primary_server}":
        ensure      => absent,
        auto_sync   => true,
        delete      => true,
        source_host => $deployment_server,
        dest_host   => $primary_server,
        module_path => '/srv/patches',
    }

    $secondary_servers.each |Stdlib::Fqdn $secondary_server| {
        unless $deployment_server == $secondary_server {
            rsync::quickdatacopy { "srv-patches-${secondary_server}":
                ensure      => present,
                auto_sync   => true,
                delete      => true,
                source_host => $deployment_server,
                dest_host   => $secondary_server,
                module_path => '/srv/patches',
                chown       => 'jenkins:705',
            }
        }
    }
}