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/mariadb/ferm.pp', line 12
define profile::mariadb::ferm (
$port = '3306',
) {
$prefix = $port ? {
'3306' => '',
default => "${title}_",
}
ferm::service{ "${prefix}mariadb_internal":
proto => 'tcp',
port => $port,
notrack => true,
srange => '$INTERNAL',
}
ferm::service{ "${prefix}orchestrator":
proto => 'tcp',
port => $port,
notrack => true,
srange => '@resolve((dborch1001.wikimedia.org))',
}
# auxiliary port
if $port == '3306' {
$extra_port = 3307
} else {
$extra_port = 20 + $port
}
ferm::service { "${title}_mariadb_dba":
proto => 'tcp',
port => $extra_port,
srange => '$MYSQL_ROOT_CLIENTS',
}
}
|