diff --git a/ansible/roles/haproxy/tasks/config.yml b/ansible/roles/haproxy/tasks/config.yml index 887af1aa5d..50d3246718 100644 --- a/ansible/roles/haproxy/tasks/config.yml +++ b/ansible/roles/haproxy/tasks/config.yml @@ -1,6 +1,9 @@ --- -- name: Allowing non-local IP binding - sysctl: name="net.ipv4.ip_nonlocal_bind" value=1 sysctl_set=yes +- name: Setting sysctl values + sysctl: name={{ item.name }} value={{ item.value }} sysctl_set=yes + with_items: + - { name: "net.ipv4.ip_nonlocal_bind", value: 1} + - { name: "net.unix.max_dgram_qlen", value: 128} when: set_sysctl | bool - name: Ensuring config directories exist diff --git a/docker/haproxy/extend_start.sh b/docker/haproxy/extend_start.sh index 16a65c0afa..c1914bb9ea 100644 --- a/docker/haproxy/extend_start.sh +++ b/docker/haproxy/extend_start.sh @@ -1,8 +1,5 @@ #!/bin/bash -# Set datagram receiving queue length to 128 for haproxy's socket -sysctl net.unix.max_dgram_qlen=128 - # We are intentionally not using exec so we can reload the haproxy config later echo "Running command: '${CMD}'" $CMD