Add tests on proxy protocol

py3
Emilien Mantel 2019-12-30 17:43:18 +01:00
parent 9b286f9b96
commit 2f8ce00067
1 changed files with 24 additions and 0 deletions

View File

@ -268,6 +268,8 @@
https_proxy_protocol_port: [20443]
template: '_base'
ssl_name: 'test-ssl.local'
headers:
'X-Proxy-Protocol': '1'
- name: '{{ ngrok.stdout }}'
proto: ['http', 'https']
template: '_base'
@ -516,6 +518,28 @@
register: notdefaultssl
failed_when: notdefaultssl.x_ansible_default is defined
# --------------------------------
# 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
# --------------------------------
# Check HTTP2
# --------------------------------