a4860753d8634d94270e582b7c8b811cbc90ddc7
[mirror/dsa-puppet.git] / modules / tcp_bbr / manifests / init.pp
1 class tcp_bbr {
2         # this is included by all hosts,
3         # so filtering needs to happen here.
4
5         if versioncmp($::lsbmajdistrelease, '9') >= 0 {
6                 if
7                    has_role('api.ftp-master') or
8                    has_role('bacula_storage') or
9                    has_role('bugs_master') or
10                    has_role('bugs_mirror') or
11                    has_role('debian_mirror') or
12                    has_role('debug_mirror') or
13                    has_role('dgit_git') or
14                    has_role('ftp.d.o') or
15                    has_role('ftp.upload.d.o') or
16                    has_role('ftp_master') or
17                    has_role('git_master') or
18                    has_role('historical_master') or
19                    has_role('historical_mirror') or
20                    has_role('ports_master') or
21                    has_role('ports_mirror') or
22                    has_role('postgres_backup_server') or
23                    has_role('postgresql_server') or
24                    has_role('security_master') or
25                    has_role('security_mirror') or
26                    has_role('security_upload') or
27                    has_role('ssh.upload.d.o') or
28                    has_role('static_master') or
29                    has_role('static_mirror') or
30                    has_role('static_source') or
31                    has_role('syncproxy') or
32                    has_role('www_master') or
33                    false {
34
35                         site::linux_module { 'tcp_bbr': }
36                         site::linux_module { 'sch_fq': }
37
38                         site::sysctl { 'puppet-net_core_default_qdisc':
39                                 key   => 'net.core.default_qdisc',
40                                 value => 'fq',
41                         }
42                         site::sysctl { 'puppet-net_ipv4_tcp_congestion_control':
43                                 key   => 'net.ipv4.tcp_congestion_control',
44                                 value => 'bbr',
45                         }
46                 }
47         }
48 }