Enable TCP BBR on a bunch of hosts. Not all for now, but maybe we should. (re:...
[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
6            has_role('api.ftp-master') or
7            has_role('bacula_storage') or
8            has_role('bugs_master') or
9            has_role('bugs_mirror') or
10            has_role('debian_mirror') or
11            has_role('debug_mirror') or
12            has_role('dgit_git') or
13            has_role('ftp.d.o') or
14            has_role('ftp.upload.d.o') or
15            has_role('ftp_master') or
16            has_role('git_master') or
17            has_role('historical_master') or
18            has_role('historical_mirror') or
19            has_role('ports_master') or
20            has_role('ports_mirror') or
21            has_role('postgres_backup_server') or
22            has_role('postgresql_server') or
23            has_role('security_master') or
24            has_role('security_mirror') or
25            has_role('security_upload') or
26            has_role('ssh.upload.d.o') or
27            has_role('static_master') or
28            has_role('static_mirror') or
29            has_role('static_source') or
30            has_role('syncproxy') or
31            has_role('www_master') or
32            false {
33
34                 site::linux_module { 'tcp_bbr': }
35                 site::linux_module { 'sch_fq': }
36
37                 site::sysctl { 'puppet-net_core_default_qdisc':
38                         key   => 'net.core.default_qdisc',
39                         value => 'fq',
40                 }
41                 site::sysctl { 'puppet-net_ipv4_tcp_congestion_control':
42                         key   => 'net.ipv4.tcp_congestion_control',
43                         value => 'bbr',
44                 }
45         }
46 }