Browse Source

Add kernel/network configuration for OVH dedicated servers

Emmanuel Bouthenot 11 years ago
parent
commit
0199ee9835

+ 2 - 0
group_vars/all

@@ -33,4 +33,6 @@ ssh_ecdsa_key: True
 
 http_auth_admin_password: seVDetGvSs7nA # openssl passwd -crypt adm123in
 
+with_ovh: False
+
 # vim: ft=yaml

+ 1 - 0
roles/common/tasks/main.yml

@@ -1,4 +1,5 @@
 - include: base.yml
+- include: ovh.yml
 - include: security.yml
 - include: smtp.yml
 - include: ssh.yml

+ 15 - 0
roles/common/tasks/ovh.yml

@@ -0,0 +1,15 @@
+- name: Install kernel configuration for OVH dedicated servers (proc)
+  action: template src=kernel/sysctl.d/${item}.j2 dest=/etc/sysctl.d/${item} owner=root group=root mode=0644
+  with_items:
+      - 01-ovh-network.conf
+  notify:
+    - Apply kernel configuration (proc)
+  when_boolean: ${with_ovh}
+
+- name: Install kernel configuration for OVH dedicated servers (sys)
+  action: template src=kernel/sysfs.d/${item}.j2 dest=/etc/sysfs.d/${item} owner=root group=root mode=0644
+  with_items:
+      - 01-ovh-network.conf
+  notify:
+    - Refresh sysfs configuration
+  when_boolean: ${with_ovh}

+ 7 - 0
roles/common/templates/kernel/sysctl.d/01-ovh-network.conf.j2

@@ -0,0 +1,7 @@
+#
+# sysctl: OVH network configuration
+#
+
+net.ipv4.tcp_congestion_control = bic
+net.ipv4.tcp_sack = 1
+

+ 7 - 0
roles/common/templates/kernel/sysfs.d/01-ovh-network.conf.j2

@@ -0,0 +1,7 @@
+#
+# sysfs: OVH network configuration
+#
+
+module/tcp_bic/parameters/smooth_part = 0
+module/tcp_bic/parameters/fast_convergence = 0
+