From 5cdd1a8b37a227d289b82c57cc206a73181a8506 Mon Sep 17 00:00:00 2001 From: Emilien Mantel Date: Tue, 31 Dec 2019 13:16:42 +0100 Subject: [PATCH] Skip tests on proxy protocol on Debian Stretch --- tests/test.yml | 39 +++++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/tests/test.yml b/tests/test.yml index ce42855..dbb6887 100644 --- a/tests/test.yml +++ b/tests/test.yml @@ -522,23 +522,30 @@ # -------------------------------- # Check Proxy protocol # -------------------------------- - - name: SHELL | Check HTTP proxy protocol - shell: curl -I --haproxy-protocol http://test-ssl-proxy-protocol.local:20080 | grep -qi 'X-Proxy-Protocol' - args: - executable: /bin/sh - warn: no - changed_when: false - tags: - - skip_ansible_lint - - name: SHELL | Check HTTPS proxy protocol - shell: curl -I --haproxy-protocol -k https://test-ssl-proxy-protocol.local:20443 | grep -qi 'X-Proxy-Protocol' - args: - executable: /bin/sh - warn: no - changed_when: false - tags: - - skip_ansible_lint +# Note: Debian Stretch doesn't any version of curl with "--haproxy-protocol" argument + + - block: + + - name: SHELL | Check HTTP proxy protocol + shell: curl -I --haproxy-protocol http://test-ssl-proxy-protocol.local:20080 | grep -qi 'X-Proxy-Protocol' + args: + executable: /bin/sh + warn: no + changed_when: false + tags: + - skip_ansible_lint + + - name: SHELL | Check HTTPS proxy protocol + shell: curl -I --haproxy-protocol -k https://test-ssl-proxy-protocol.local:20443 | grep -qi 'X-Proxy-Protocol' + args: + executable: /bin/sh + warn: no + changed_when: false + tags: + - skip_ansible_lint + + when: not (ansible_distribution == 'Debian' and ansible_distribution_major_version is version('9', 'eq')) # -------------------------------- # Check HTTP2