Puppet Class: profile::mediawiki::scap_proxy

Defined in:
modules/profile/manifests/mediawiki/scap_proxy.pp

Overview

class: profile::mediawiki::scap_proxy

Sets up an rsync proxy for scap, if the server is set up to be one

Parameters:

  • scap_proxies (Any) (defaults to: hiera('scap::dsh::scap_proxies',[]))


5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'modules/profile/manifests/mediawiki/scap_proxy.pp', line 5

class profile::mediawiki::scap_proxy(
    $scap_proxies = hiera('scap::dsh::scap_proxies',[])
) {
    include ::network::constants

    # Yes, this is an antipattern. But in the end it's the easiest way
    # to organize code and data. Deal with it :P
    if member($scap_proxies, $::fqdn) {
        class { '::rsync::server': }

        rsync::server::module { 'common':
            path        => '/srv/mediawiki',
            read_only   => 'yes',
            hosts_allow => $::network::constants::mw_appserver_networks;
        }

        ferm::service { 'rsyncd_scap_proxy':
            proto  => 'tcp',
            port   => '873',
            srange => '$MW_APPSERVER_NETWORKS',
        }
    }

}