From 072dba40d47d60b11a5724cd80fe94c0fcc0cda0 Mon Sep 17 00:00:00 2001 From: Mischa ter Smitten Date: Thu, 7 Mar 2019 13:43:48 +0100 Subject: [PATCH 01/24] Add latest Ansible versions (2.7.8, 2.6.14, and 2.5.15) --- .travis.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 337c895b..a648c7e7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,8 @@ python: "2.7" env: - ANSIBLE_VERSION=latest + - ANSIBLE_VERSION=2.7.8 + - ANSIBLE_VERSION=2.7.7 - ANSIBLE_VERSION=2.7.6 - ANSIBLE_VERSION=2.7.5 - ANSIBLE_VERSION=2.7.4 @@ -14,6 +16,8 @@ env: - ANSIBLE_VERSION=2.7.2 - ANSIBLE_VERSION=2.7.1 - ANSIBLE_VERSION=2.7.0 + - ANSIBLE_VERSION=2.6.14 + - ANSIBLE_VERSION=2.6.13 - ANSIBLE_VERSION=2.6.12 - ANSIBLE_VERSION=2.6.11 - ANSIBLE_VERSION=2.6.10 @@ -27,6 +31,7 @@ env: - ANSIBLE_VERSION=2.6.2 - ANSIBLE_VERSION=2.6.1 - ANSIBLE_VERSION=2.6.0 + - ANSIBLE_VERSION=2.5.15 - ANSIBLE_VERSION=2.5.14 - ANSIBLE_VERSION=2.5.13 - ANSIBLE_VERSION=2.5.12 @@ -83,9 +88,6 @@ script: notifications: email: false - hipchat: - rooms: - secure: 5E26TUa3gV2/vSsuMtkAOtx7VsJf2XWEkfkhE8F1O2QvKrtRanVZZN9MJOba970GmZFQQne1so9HvXAeaPnD3LEcqy+SGAn6JvyH0mYy8i6a/gd9kxiOMHF3gTqCdDsu/SKPAB8N4J1eDvDo/6dfnVzifsZwvw92D9uOkEKi5cEiV8KhKAzK7tLQqAKESNt1BbnCAuTAz38WxJJVrMNPYlZ1gOqK9fIXfhRi0u+oo+21UqzOh6L65gAcD2PYvnt6Ak0KMgIo+iqui6xF7SG4IaMHk9G4FjY77cxxYy39HIAwNUArO0F1OO59b2oofdKX8w2X8TL+4t9zluKorgmvBGHtDcwxy9x2pjJqiTNpYSZyIRZMzM5ocA8y6JeGcl9VDTsO4hJWHqaB+WSulPYtGwZ1UMHPt0GmxdL3kf/ksmq6FJA4PGpV8YMHS65rMs9PibLeWnP7Ja4LQHlJ/eWUSQoCRECBrKxq4zgvTwEr9pxXeQXm85j29KO0c4UmJQhw1ISGuL6Z3VHOewCcdOvNzQmQn9y/rxVpmOWYlJpwPVAf3ht3D3C6t5aoViIwS508pnVzAycnpbxVPRpisQW/j/IC6PeChi3xv24n2pGJctoXtn/vWzt3VXEKKj9Y/Mr9hAEyNlNJfcaLhuicCcMa0d4j3ue8VRpjIjAnRJYBm28= webhooks: https://galaxy.ansible.com/api/v1/notifications/ slack: rooms: From a142d406f3faf0b9ae0cf1bd38456d6223b97023 Mon Sep 17 00:00:00 2001 From: Mischa ter Smitten Date: Fri, 21 Jun 2019 14:17:57 +0200 Subject: [PATCH 02/24] Add latest Ansible versions --- .travis.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.travis.yml b/.travis.yml index a648c7e7..dd43c568 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,11 @@ python: "2.7" env: - ANSIBLE_VERSION=latest + - ANSIBLE_VERSION=2.8.1 + - ANSIBLE_VERSION=2.8.0 + - ANSIBLE_VERSION=2.7.11 + - ANSIBLE_VERSION=2.7.10 + - ANSIBLE_VERSION=2.7.9 - ANSIBLE_VERSION=2.7.8 - ANSIBLE_VERSION=2.7.7 - ANSIBLE_VERSION=2.7.6 @@ -16,6 +21,9 @@ env: - ANSIBLE_VERSION=2.7.2 - ANSIBLE_VERSION=2.7.1 - ANSIBLE_VERSION=2.7.0 + - ANSIBLE_VERSION=2.6.17 + - ANSIBLE_VERSION=2.6.16 + - ANSIBLE_VERSION=2.6.15 - ANSIBLE_VERSION=2.6.14 - ANSIBLE_VERSION=2.6.13 - ANSIBLE_VERSION=2.6.12 From 13d50ed81e38e53ae769fd338603ea109b9a0679 Mon Sep 17 00:00:00 2001 From: Mischa ter Smitten Date: Fri, 19 Jul 2019 14:31:16 +0200 Subject: [PATCH 03/24] Add latest Ansible versions --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index dd43c568..1862b31c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,8 +7,10 @@ python: "2.7" env: - ANSIBLE_VERSION=latest + - ANSIBLE_VERSION=2.8.2 - ANSIBLE_VERSION=2.8.1 - ANSIBLE_VERSION=2.8.0 + - ANSIBLE_VERSION=2.7.12 - ANSIBLE_VERSION=2.7.11 - ANSIBLE_VERSION=2.7.10 - ANSIBLE_VERSION=2.7.9 @@ -21,6 +23,7 @@ env: - ANSIBLE_VERSION=2.7.2 - ANSIBLE_VERSION=2.7.1 - ANSIBLE_VERSION=2.7.0 + - ANSIBLE_VERSION=2.6.18 - ANSIBLE_VERSION=2.6.17 - ANSIBLE_VERSION=2.6.16 - ANSIBLE_VERSION=2.6.15 From 662b936bd39a46642eb72bdedf831498f10c4710 Mon Sep 17 00:00:00 2001 From: Mischa ter Smitten Date: Wed, 7 Aug 2019 15:59:06 +0200 Subject: [PATCH 04/24] Add latest Ansible versions --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 1862b31c..53a7bf27 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,7 @@ python: "2.7" env: - ANSIBLE_VERSION=latest + - ANSIBLE_VERSION=2.8.3 - ANSIBLE_VERSION=2.8.2 - ANSIBLE_VERSION=2.8.1 - ANSIBLE_VERSION=2.8.0 From c622c582d5277ea0ff6b594ac2e159f4b28b146e Mon Sep 17 00:00:00 2001 From: Andrea Sosso Date: Fri, 30 Aug 2019 12:50:09 +0200 Subject: [PATCH 05/24] a 'tcp-request' rule placed after an 'http-request' rule will still be processed before --- templates/etc/haproxy/frontend.cfg.j2 | 20 ++++++++++---------- templates/etc/haproxy/listen.cfg.j2 | 10 +++++----- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/templates/etc/haproxy/frontend.cfg.j2 b/templates/etc/haproxy/frontend.cfg.j2 index d1867914..c6d51063 100644 --- a/templates/etc/haproxy/frontend.cfg.j2 +++ b/templates/etc/haproxy/frontend.cfg.j2 @@ -51,16 +51,6 @@ frontend {{ frontend.name }} capture {{ capture.type }} {{ capture.name }} len {{ capture.length }} {% endfor %} -{% for http_request in frontend.http_request | default([]) %} - http-request {{ http_request.action }}{% if http_request.param is defined %} {{ http_request.param }}{% endif %}{% if http_request.cond is defined %} {{ http_request.cond }}{% endif %} - -{% endfor %} - -{% for http_response in frontend.http_response | default([]) %} - http-response {{ http_response.action }}{% if http_response.param is defined %} {{ http_response.param }}{% endif %}{% if http_response.cond is defined %} {{ http_response.cond }}{% endif %} - -{% endfor %} - {% for tcp_request_inspect_delay in frontend.tcp_request_inspect_delay | default([]) %} tcp-request inspect-delay {{ tcp_request_inspect_delay.timeout }} @@ -81,6 +71,16 @@ frontend {{ frontend.name }} {% endfor %} +{% for http_request in frontend.http_request | default([]) %} + http-request {{ http_request.action }}{% if http_request.param is defined %} {{ http_request.param }}{% endif %}{% if http_request.cond is defined %} {{ http_request.cond }}{% endif %} + +{% endfor %} + +{% for http_response in frontend.http_response | default([]) %} + http-response {{ http_response.action }}{% if http_response.param is defined %} {{ http_response.param }}{% endif %}{% if http_response.cond is defined %} {{ http_response.cond }}{% endif %} + +{% endfor %} + {% for action in ['reqadd', 'rspadd'] %} {% for params in frontend[action] | default([]) %} {{ action }} {{ params.string }}{% if params.cond is defined %} {{ params.cond }}{% endif %} diff --git a/templates/etc/haproxy/listen.cfg.j2 b/templates/etc/haproxy/listen.cfg.j2 index f3b9e301..1366dfe2 100644 --- a/templates/etc/haproxy/listen.cfg.j2 +++ b/templates/etc/haproxy/listen.cfg.j2 @@ -84,11 +84,6 @@ listen {{ listen.name }} {% endif %} {% endif %} -{% for http_request in listen.http_request | default([]) %} - http-request {{ http_request.action }}{% if http_request.param is defined %} {{ http_request.param }}{% endif %}{% if http_request.cond is defined %} {{ http_request.cond }}{% endif %} - -{% endfor %} - {% for tcp_request_inspect_delay in listen.tcp_request_inspect_delay | default([]) %} tcp-request inspect-delay {{ tcp_request_inspect_delay.timeout }} @@ -109,6 +104,11 @@ listen {{ listen.name }} {% endfor %} +{% for http_request in listen.http_request | default([]) %} + http-request {{ http_request.action }}{% if http_request.param is defined %} {{ http_request.param }}{% endif %}{% if http_request.cond is defined %} {{ http_request.cond }}{% endif %} + +{% endfor %} + {% for http_response in listen.http_response | default([]) %} http-response {{ http_response.action }}{% if http_response.param is defined %} {{ http_response.param }}{% endif %}{% if http_response.cond is defined %} {{ http_response.cond }}{% endif %} From 9afdecfdc17dc6b9052f440db2395281d284023a Mon Sep 17 00:00:00 2001 From: Mischa ter Smitten Date: Mon, 16 Sep 2019 14:32:53 +0200 Subject: [PATCH 06/24] Add latest Ansible versions --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index 53a7bf27..8fbac790 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,10 +7,13 @@ python: "2.7" env: - ANSIBLE_VERSION=latest + - ANSIBLE_VERSION=2.8.5 + - ANSIBLE_VERSION=2.8.4 - ANSIBLE_VERSION=2.8.3 - ANSIBLE_VERSION=2.8.2 - ANSIBLE_VERSION=2.8.1 - ANSIBLE_VERSION=2.8.0 + - ANSIBLE_VERSION=2.7.13 - ANSIBLE_VERSION=2.7.12 - ANSIBLE_VERSION=2.7.11 - ANSIBLE_VERSION=2.7.10 @@ -24,6 +27,7 @@ env: - ANSIBLE_VERSION=2.7.2 - ANSIBLE_VERSION=2.7.1 - ANSIBLE_VERSION=2.7.0 + - ANSIBLE_VERSION=2.6.19 - ANSIBLE_VERSION=2.6.18 - ANSIBLE_VERSION=2.6.17 - ANSIBLE_VERSION=2.6.16 From cc6c6154e7c7e4c65455df16174545f11df91f38 Mon Sep 17 00:00:00 2001 From: Mischa ter Smitten Date: Fri, 25 Oct 2019 16:27:49 +0200 Subject: [PATCH 07/24] Add latest Ansible versions (2.8.6, 2.7.14, 2.6.20) --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index 8fbac790..31b0dba2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,12 +7,14 @@ python: "2.7" env: - ANSIBLE_VERSION=latest + - ANSIBLE_VERSION=2.8.6 - ANSIBLE_VERSION=2.8.5 - ANSIBLE_VERSION=2.8.4 - ANSIBLE_VERSION=2.8.3 - ANSIBLE_VERSION=2.8.2 - ANSIBLE_VERSION=2.8.1 - ANSIBLE_VERSION=2.8.0 + - ANSIBLE_VERSION=2.7.14 - ANSIBLE_VERSION=2.7.13 - ANSIBLE_VERSION=2.7.12 - ANSIBLE_VERSION=2.7.11 @@ -27,6 +29,7 @@ env: - ANSIBLE_VERSION=2.7.2 - ANSIBLE_VERSION=2.7.1 - ANSIBLE_VERSION=2.7.0 + - ANSIBLE_VERSION=2.6.20 - ANSIBLE_VERSION=2.6.19 - ANSIBLE_VERSION=2.6.18 - ANSIBLE_VERSION=2.6.17 From 34fe5aed5d30b2263bdcf186e66238c4b4b8a9b0 Mon Sep 17 00:00:00 2001 From: Andrea Sosso Date: Sun, 17 Nov 2019 09:41:42 +0100 Subject: [PATCH 08/24] Enable HAProxy 2.0 LTS release --- vars/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/vars/main.yml b/vars/main.yml index a1f8748e..3b163c2f 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -6,5 +6,6 @@ haproxy_versions_supported: - '1.7' - '1.8' - '1.9' + - '2.0' haproxy_ppa: "ppa:vbernat/haproxy-{{ haproxy_version }}" From a1d67aea09019dcfe2d6a739e3ae37def5bc7491 Mon Sep 17 00:00:00 2001 From: Mischa ter Smitten Date: Tue, 19 Nov 2019 15:16:45 +0100 Subject: [PATCH 09/24] Enable HAProxy 2.0 LTS release --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0d6970f3..74392626 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ ## haproxy -[![Build Status](https://travis-ci.org/Oefenweb/ansible-haproxy.svg?branch=master)](https://travis-ci.org/Oefenweb/ansible-haproxy) [![Ansible Galaxy](http://img.shields.io/badge/ansible--galaxy-haproxy-blue.svg)](https://galaxy.ansible.com/Oefenweb/haproxy) +[![Build Status](https://travis-ci.org/Oefenweb/ansible-haproxy.svg?branch=master)](https://travis-ci.org/Oefenweb/ansible-haproxy) +[![Ansible Galaxy](http://img.shields.io/badge/ansible--galaxy-haproxy-blue.svg)](https://galaxy.ansible.com/Oefenweb/haproxy) Set up (the latest version of) [HAProxy](http://www.haproxy.org/) in Ubuntu systems. @@ -10,7 +11,7 @@ Set up (the latest version of) [HAProxy](http://www.haproxy.org/) in Ubuntu syst #### Variables -* `haproxy_version`: [default: `1.8`]: Version to install (e.g. `1.5`, `1.6`, `1.7`, `1.8`) +* `haproxy_version`: [default: `1.8`]: Version to install (e.g. `1.5`, `1.6`, `1.7`, `1.8`, `1.9`, `2.0`) * `haproxy_install`: [default: `[]`]: Additional packages to install (e.g. `socat`) From e4e85db1bce2a10fdd6c2735d35c37cd9e9366c7 Mon Sep 17 00:00:00 2001 From: Andrea Sosso Date: Fri, 29 Nov 2019 17:19:13 +0100 Subject: [PATCH 10/24] nable HAProxy 2.1 (Stable version) --- README.md | 2 +- vars/main.yml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 74392626..0d7979c3 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Set up (the latest version of) [HAProxy](http://www.haproxy.org/) in Ubuntu syst #### Variables -* `haproxy_version`: [default: `1.8`]: Version to install (e.g. `1.5`, `1.6`, `1.7`, `1.8`, `1.9`, `2.0`) +* `haproxy_version`: [default: `1.8`]: Version to install (e.g. `1.5`, `1.6`, `1.7`, `1.8`, `1.9`, `2.0`, `2.1`) * `haproxy_install`: [default: `[]`]: Additional packages to install (e.g. `socat`) diff --git a/vars/main.yml b/vars/main.yml index 3b163c2f..e74f425e 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -7,5 +7,6 @@ haproxy_versions_supported: - '1.8' - '1.9' - '2.0' + - '2.1' haproxy_ppa: "ppa:vbernat/haproxy-{{ haproxy_version }}" From d6c28ca114f236a2835839c3a2c41df5f24fbd0b Mon Sep 17 00:00:00 2001 From: Mischa ter Smitten Date: Tue, 10 Dec 2019 12:05:13 +0100 Subject: [PATCH 11/24] version_compare -> version --- tests/vagrant.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/vagrant.yml b/tests/vagrant.yml index bea52524..19f9e8b6 100644 --- a/tests/vagrant.yml +++ b/tests/vagrant.yml @@ -6,4 +6,4 @@ roles: - ../../ vars: - haproxy_version: "{{ (ansible_distribution_version is version_compare('12.04', '>')) | ternary(1.8, 1.7) }}" + haproxy_version: "{{ (ansible_distribution_version is version('12.04', '>')) | ternary(1.8, 1.7) }}" From 7d0f1ea08fc3fb07e6b0fc1d76ab936f29513857 Mon Sep 17 00:00:00 2001 From: Mischa ter Smitten Date: Mon, 17 Feb 2020 12:57:34 +0100 Subject: [PATCH 12/24] Add latest Ansible versions --- .travis.yml | 10 ++++++++++ Vagrantfile | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 31b0dba2..b9b046b7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,14 @@ python: "2.7" env: - ANSIBLE_VERSION=latest + - ANSIBLE_VERSION=2.9.5 + - ANSIBLE_VERSION=2.9.4 + - ANSIBLE_VERSION=2.9.3 + - ANSIBLE_VERSION=2.9.2 + - ANSIBLE_VERSION=2.9.1 + - ANSIBLE_VERSION=2.9.0 + - ANSIBLE_VERSION=2.8.8 + - ANSIBLE_VERSION=2.8.7 - ANSIBLE_VERSION=2.8.6 - ANSIBLE_VERSION=2.8.5 - ANSIBLE_VERSION=2.8.4 @@ -14,6 +22,8 @@ env: - ANSIBLE_VERSION=2.8.2 - ANSIBLE_VERSION=2.8.1 - ANSIBLE_VERSION=2.8.0 + - ANSIBLE_VERSION=2.7.16 + - ANSIBLE_VERSION=2.7.15 - ANSIBLE_VERSION=2.7.14 - ANSIBLE_VERSION=2.7.13 - ANSIBLE_VERSION=2.7.12 diff --git a/Vagrantfile b/Vagrantfile index a7579518..05a5ee61 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -30,7 +30,7 @@ boxes = [ :box => "bento/ubuntu-18.04", :ip => '10.0.0.14', :cpu => "50", - :ram => "256" + :ram => "384" }, ] From 9710dba4347b3d88bb5d0795b47904584abf1b42 Mon Sep 17 00:00:00 2001 From: Mischa ter Smitten Date: Fri, 20 Mar 2020 14:44:55 +0100 Subject: [PATCH 13/24] Improved formatting --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0d7979c3..735a0676 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ Set up (the latest version of) [HAProxy](http://www.haproxy.org/) in Ubuntu syst * `haproxy_global_tune`: [default: `[]`]: (Performance) tuning declarations * `haproxy_global_tune.{n}.key`: [required]: Setting name (e.g. `ssl.cachesize`) * `haproxy_global_tune.{n}.value`: [required]: Setting value (e.g. `50000`) -* `haproxy_global_option`: [default: `[]`]: Options (e.g. ['lua-load /etc/haproxy/acme-http01-webroot.lua', 'ssl-dh-param-file /etc/haproxy/dhparams.pem']) +* `haproxy_global_option`: [default: `[]`]: Options (e.g. `['lua-load /etc/haproxy/acme-http01-webroot.lua', 'ssl-dh-param-file /etc/haproxy/dhparams.pem']`) * `haproxy_global_peers`: Peer list declarations * `haproxy_global_peers.{n}.name`: Peer list name (e.g. `mypeers`) * `haproxy_global_peers.{n}.peers`: Peer declarations From f51df08d2d1d3432f171c8f1024116216fb32729 Mon Sep 17 00:00:00 2001 From: Miika Kankare Date: Mon, 13 Apr 2020 12:08:30 +0300 Subject: [PATCH 14/24] Add ciphersuites options for TLSv1.3 --- README.md | 2 ++ defaults/main.yml | 2 ++ templates/etc/haproxy/global.cfg.j2 | 8 ++++++++ 3 files changed, 12 insertions(+) diff --git a/README.md b/README.md index 735a0676..2022a1af 100644 --- a/README.md +++ b/README.md @@ -35,8 +35,10 @@ Set up (the latest version of) [HAProxy](http://www.haproxy.org/) in Ubuntu syst * `haproxy_global_ca_base`: [default: `/etc/ssl/certs`]: Assigns a default directory to fetch SSL CA certificates and CRLs from when a relative path is used with `"ca-file"` or `"crl-file"` directives * `haproxy_global_crt_base`: [default: `/etc/ssl/private`]: Assigns a default directory to fetch SSL certificates from when a relative path is used with `"crtfile"` directives * `haproxy_global_ssl_default_bind_ciphers`: [default: `kEECDH+aRSA+AES:kRSA+AES:+AES256:RC4-SHA:!kEDH:!LOW:!EXP:!MD5:!aNULL:!eNULL`]: This setting is only available when support for OpenSSL was built in. It sets the default string describing the list of cipher algorithms ("cipher suite") that are negotiated during the SSL/TLS handshake for all `"bind"` lines which do not explicitly define theirs +* `haproxy_global_ssl_default_bind_ciphersuites`: [default: ``]: This setting is only available when support for OpenSSL was built in and OpenSSL 1.1.1 or later was used to build HAProxy. It sets the default string describing the list of cipher algorithms ("cipher suite") that are negotiated during the TLSv1.3 handshake for all `"bind"` lines which do not explicitly define theirs * `haproxy_global_ssl_default_bind_options`: [default: `no-sslv3`]: This setting is only available when support for OpenSSL was built in. It sets default ssl-options to force on all `"bind"` lines * `haproxy_global_ssl_default_server_ciphers`: [default: `kEECDH+aRSA+AES:kRSA+AES:+AES256:RC4-SHA:!kEDH:!LOW:!EXP:!MD5:!aNULL:!eNULL`]: This setting is only available when support for OpenSSL was built in. It sets the default string describing the list of cipher algorithms that are negotiated during the SSL/TLS handshake with the server, for all `"server"` lines which do not explicitly define theirs +* `haproxy_global_ssl_default_server_ciphersuites`: [default: ``]: This setting is only available when support for OpenSSL was built in and OpenSSL 1.1.1 or later was used to build HAProxy. It sets the default string describing the list of cipher algorithms that are negotiated duringthe TLSv1.3 handshake with the server, for all `"server"` lines which do not explicitly define theirs * `haproxy_global_ssl_default_server_options`: [default: `no-sslv3`]: This setting is only available when support for OpenSSL was built in. It sets default ssl-options to force on all `"server"` lines * `haproxy_global_ssl_engines`: [optional, default `[]`]: OpenSSL engine declarations (`>= 1.8.0` only) * `haproxy_global_ssl_engines.{n}.name`: [required]: Sets the OpenSSL engine to use (e.g. `rdrand`) diff --git a/defaults/main.yml b/defaults/main.yml index e152c061..10df3e43 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -28,8 +28,10 @@ haproxy_global_daemon: true haproxy_global_ca_base: /etc/ssl/certs haproxy_global_crt_base: /etc/ssl/private haproxy_global_ssl_default_bind_ciphers: 'kEECDH+aRSA+AES:kRSA+AES:+AES256:RC4-SHA:!kEDH:!LOW:!EXP:!MD5:!aNULL:!eNULL' +haproxy_global_ssl_default_bind_ciphersuites: '' haproxy_global_ssl_default_bind_options: 'no-sslv3' haproxy_global_ssl_default_server_ciphers: 'kEECDH+aRSA+AES:kRSA+AES:+AES256:RC4-SHA:!kEDH:!LOW:!EXP:!MD5:!aNULL:!eNULL' +haproxy_global_ssl_default_server_ciphersuites: '' haproxy_global_ssl_default_server_options: 'no-sslv3' haproxy_global_nbproc: 1 haproxy_global_option: [] diff --git a/templates/etc/haproxy/global.cfg.j2 b/templates/etc/haproxy/global.cfg.j2 index 81e9bb89..c6fc4e9f 100644 --- a/templates/etc/haproxy/global.cfg.j2 +++ b/templates/etc/haproxy/global.cfg.j2 @@ -55,6 +55,10 @@ ssl-default-bind-ciphers {{ haproxy_global_ssl_default_bind_ciphers }} {% endif %} +{% if haproxy_global_ssl_default_bind_ciphersuites != false and haproxy_global_ssl_default_bind_ciphersuites | length > 0 %} + ssl-default-bind-ciphersuites {{ haproxy_global_ssl_default_bind_ciphersuites }} +{% endif %} + {% if haproxy_global_ssl_default_bind_options != false %} ssl-default-bind-options {{ haproxy_global_ssl_default_bind_options }} {% endif %} @@ -66,6 +70,10 @@ ssl-default-server-ciphers {{ haproxy_global_ssl_default_server_ciphers }} {% endif %} +{% if haproxy_global_ssl_default_server_ciphersuites != false and haproxy_global_ssl_default_server_ciphersuites | length > 0 %} + ssl-default-server-ciphersuites {{ haproxy_global_ssl_default_server_ciphersuites }} +{% endif %} + {% if haproxy_global_ssl_default_server_options != false %} ssl-default-server-options {{ haproxy_global_ssl_default_server_options }} {% endif %} From b95a3658e956515e42e11379d3bccd54a884a45a Mon Sep 17 00:00:00 2001 From: Miika Kankare Date: Thu, 16 Apr 2020 11:27:27 +0300 Subject: [PATCH 15/24] Simplify ciphersuites conditionals --- templates/etc/haproxy/global.cfg.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/etc/haproxy/global.cfg.j2 b/templates/etc/haproxy/global.cfg.j2 index c6fc4e9f..2d396d85 100644 --- a/templates/etc/haproxy/global.cfg.j2 +++ b/templates/etc/haproxy/global.cfg.j2 @@ -55,7 +55,7 @@ ssl-default-bind-ciphers {{ haproxy_global_ssl_default_bind_ciphers }} {% endif %} -{% if haproxy_global_ssl_default_bind_ciphersuites != false and haproxy_global_ssl_default_bind_ciphersuites | length > 0 %} +{% if haproxy_global_ssl_default_bind_ciphersuites %} ssl-default-bind-ciphersuites {{ haproxy_global_ssl_default_bind_ciphersuites }} {% endif %} @@ -70,7 +70,7 @@ ssl-default-server-ciphers {{ haproxy_global_ssl_default_server_ciphers }} {% endif %} -{% if haproxy_global_ssl_default_server_ciphersuites != false and haproxy_global_ssl_default_server_ciphersuites | length > 0 %} +{% if haproxy_global_ssl_default_server_ciphersuites %} ssl-default-server-ciphersuites {{ haproxy_global_ssl_default_server_ciphersuites }} {% endif %} From 7092fee12277f47063808a326939a2d02787f967 Mon Sep 17 00:00:00 2001 From: Martyn Klassen Date: Mon, 20 Nov 2017 16:10:57 -0500 Subject: [PATCH 16/24] Switch from deprecated ansible include module to import_tasks --- tasks/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index 1891f20d..8b2cba3c 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -9,25 +9,25 @@ - haproxy - haproxy-check-version-support -- include: install.yml +- import_tasks: install.yml tags: - configuration - haproxy - haproxy-install -- include: certificates.yml +- import_tasks: certificates.yml tags: - configuration - haproxy - haproxy-certificates -- include: acl.yml +- import_tasks: acl.yml tags: - configuration - haproxy - haproxy-acl -- include: configuration.yml +- import_tasks: configuration.yml tags: - configuration - haproxy From 801cdef5f4022ce4122005f1d9722dba9ab75b3f Mon Sep 17 00:00:00 2001 From: Igor Solovey Date: Thu, 9 Apr 2020 16:08:37 -0400 Subject: [PATCH 17/24] Add resolvers section --- README.md | 13 +++++++++++++ defaults/main.yml | 3 +++ templates/etc/haproxy/haproxy.cfg.j2 | 2 ++ templates/etc/haproxy/resolvers.cfg.j2 | 25 +++++++++++++++++++++++++ 4 files changed, 43 insertions(+) create mode 100644 templates/etc/haproxy/resolvers.cfg.j2 diff --git a/README.md b/README.md index 2022a1af..86ef5480 100644 --- a/README.md +++ b/README.md @@ -377,6 +377,19 @@ Set up (the latest version of) [HAProxy](http://www.haproxy.org/) in Ubuntu syst * `haproxy_userlists.{n}.users.{n}.insecure_password`: [optional] Plaintext password of this user. **One of `password` or `insecure_password` must be set** * `haproxy_userlists.{n}.users.{n}.groups`: [optional] List of groups to add the user to +* `haproxy_resolvers`: [default: `[]`]: Resolvers (name servers) declarations +* `haproxy_resolvers.{n}.name`: [required]: The name of the name server list +* `haproxy_resolvers.{n}.nameservers`: [required] list of DNS servers +* `haproxy_resolvers.{n}.nameservers.{n}.name`: [required] label of the server, should be unique +* `haproxy_resolvers.{n}.nameservers.{n}.listen`: [required] Defines a listening address and/or ports, e.g. `8.8.8.8:53` +* `haproxy_resolvers.{n}.accepted_payload_size`: [optional]: Defines the maximum payload size (in bytes) accepted by HAProxy and announced to all the name servers configured in this resolvers section. If not set, HAProxy announces 512. (minimal value defined by RFC 6891) +* `haproxy_resolvers.{n}.parse_resolv_conf`: [optional]: If set to `true`, adds all nameservers found in `/etc/resolv.conf` to this resolver's nameservers list. +* `haproxy_resolvers.{n}.resolve_retries`: [optional]: Defines the number of queries to send to resolve a server name before giving up. +* `haproxy_resolvers.{n}.hold`: [optional]: A list of directives defining `` during which the last name resolution should be kept based on last resolution ``. +* `haproxy_resolvers.{n}.hold.{status}`: [optional]: hold directives in `:` format. Key must be one of (`nx`, `other`, `refused`, `timeout`, `valid`, `obsolete`). Value is interval between two successive name resolutions in HAProxy time format. +* `haproxy_resolvers.{n}.timeout`: [optional]: Defines timeouts related to name resolution +* `haproxy_resolvers.{n}.timeout.{event}`: [optional]: timeout directives in `: