Puppet Class: profile::pontoon::lb

Defined in:
modules/profile/manifests/pontoon/lb.pp

Overview



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

class profile::pontoon::lb {
    ensure_packages('hatop')

    $role_services = wmflib::service::fetch().filter |$name, $config| {
        ('role' in $config and pontoon::hosts_for_role($config['role']))
    }

    class { 'pontoon::lb':
        services_config => $role_services,
    }

    $ports = unique($role_services.map |$name, $svc| { $svc['port'] })

    $ports.sort.each |$p| {
        ferm::service { "pontoon-lb-${p}":
            proto   => 'tcp',
            notrack => true,
            port    => $p,
        }
    }
}