haproxy: add a task that increases the dimension of the conntrack table.

This commit is contained in:
Andrea Dell'Amico 2017-12-19 17:58:31 +01:00
parent 78872533ad
commit 4a9636fe3f
2 changed files with 10 additions and 0 deletions

View File

@ -25,3 +25,5 @@ haproxy_nagios_check_c: 90
haproxy_check_interval: 3s haproxy_check_interval: 3s
haproxy_backend_maxconn: 2048 haproxy_backend_maxconn: 2048
haproxy_sysctl_conntrack_max: 131072

View File

@ -45,10 +45,18 @@
with_items: with_items:
- net.ipv4.ip_nonlocal_bind - net.ipv4.ip_nonlocal_bind
when: haproxy_k_bind_non_local_ip when: haproxy_k_bind_non_local_ip
tags: [ 'haproxy', 'haproxy_sysctl' ]
- name: Disable kernel binding non local IP addresses - name: Disable kernel binding non local IP addresses
sysctl: name={{ item }} value=0 reload=yes state=present sysctl: name={{ item }} value=0 reload=yes state=present
with_items: with_items:
- net.ipv4.ip_nonlocal_bind - net.ipv4.ip_nonlocal_bind
when: not haproxy_k_bind_non_local_ip when: not haproxy_k_bind_non_local_ip
tags: [ 'haproxy', 'haproxy_sysctl' ]
- name: Increase the connection tracking table capacity
sysctl: name={{ item }} value={{ haproxy_sysctl_conntrack_max }} reload=yes state=present
with_items:
- net.nf_conntrack_max
tags: [ 'haproxy', 'haproxy_sysctl' ]