Puppet Class: profile::dumps::distribution::ferm

Defined in:
modules/profile/manifests/dumps/distribution/ferm.pp

Overview

SPDX-License-Identifier: Apache-2.0

Parameters:

  • internal_rsync_clients (Array[Stdlib::Fqdn]) (defaults to: lookup('profile::dumps::rsync_internal_clients'))
  • rsync_mirrors (Array[Wmflib::Dumps::Mirror]) (defaults to: lookup('profile::dumps::distribution::mirrors'))


2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'modules/profile/manifests/dumps/distribution/ferm.pp', line 2

class profile::dumps::distribution::ferm(
    Array[Stdlib::Fqdn] $internal_rsync_clients = lookup('profile::dumps::rsync_internal_clients'),
    Array[Wmflib::Dumps::Mirror] $rsync_mirrors = lookup('profile::dumps::distribution::mirrors'),
) {
    $active_mirrors = $rsync_mirrors.filter |$item| { $item['active'] == 'yes' }
    $mirror_hosts = $active_mirrors.map |$item| { $item['ipv4'] + $item['ipv6'] }

    $rsync_clients = flatten($internal_rsync_clients + $mirror_hosts)

    ferm::service { 'dumps_rsyncd':
        port   => '873',
        proto  => 'tcp',
        srange => "@resolve((${rsync_clients.join(' ')}))",
    }
}