36 lines
1.4 KiB
YAML
36 lines
1.4 KiB
YAML
---
|
|
_vhost_location_defaults:
|
|
type: "{{ vhost_type }}"
|
|
headers: "{{ vhost_headers }}"
|
|
delete_headers: "{{ vhost_delete_headers }}"
|
|
|
|
basicauth: "{{ vhost_basicauth }}"
|
|
basicauth_users: "{{ vhost_basicauth_users }}"
|
|
|
|
proxy_target_netproto: "{{ vhost_proxy_target_netproto }}"
|
|
proxy_target_protocol: "{{ vhost_proxy_target_protocol }}"
|
|
proxy_target_host: "{{ vhost_proxy_target_host }}"
|
|
proxy_target_port: "{{ vhost_proxy_target_port if
|
|
vhost_type == 'reverse_proxy' and vhost_proxy_target_netproto == 'tcp' else '' }}"
|
|
proxy_target_socket: "{{ vhost_proxy_target_socket if
|
|
vhost_type == 'reverse_proxy' and vhost_proxy_target_netproto == 'unix' else '' }}"
|
|
proxy_delete_headers: "{{ vhost_proxy_delete_headers }}"
|
|
proxy_pass_host_header: "{{ vhost_proxy_pass_host_header }}"
|
|
|
|
redirect_target: "{{ vhost_redirect_target if vhost_type == 'redirect' else '' }}"
|
|
redirect_preserve_path: "{{ vhost_redirect_preserve_path }}"
|
|
redirect_preserve_query: "{{ vhost_redirect_preserve_query }}"
|
|
redirect_type: "{{ vhost_redirect_type }}"
|
|
|
|
respond_content: "{{ vhost_respond_content if vhost_type == 'respond' else '' }}"
|
|
respond_content_type: "{{ vhost_respond_content_type }}"
|
|
|
|
_vhost_locations: "{{ vhost_locations + [{'path': ''}] }}"
|
|
|
|
_vhost_locations_complete: "{{
|
|
_vhost_locations
|
|
| map('combine', _vhost_location_defaults)
|
|
| zip(_vhost_locations)
|
|
| map('combine')
|
|
}}"
|