formatting
This commit is contained in:
@@ -5,25 +5,25 @@
|
||||
msg: "uumas.general.reverse_proxy is deprecated. You should switch to uumas.general.vhost with vhost_type: reverse_proxy"
|
||||
|
||||
- block:
|
||||
- name: Split legacy proxy_target to protocol, host and port
|
||||
set_fact:
|
||||
proxy_target_split_protocol: "{{ proxy_target.split('://') }}"
|
||||
- set_fact:
|
||||
proxy_target_split_host: "{{ (proxy_target_split_protocol | last).split(':') }}"
|
||||
- set_fact:
|
||||
proxy_target_host: "{{ proxy_target_split_host[0] }}"
|
||||
proxy_target_port: "{{ proxy_target_split_host[1] }}"
|
||||
|
||||
- name: Set proxy_target_protocol based on proxy_target
|
||||
set_fact:
|
||||
proxy_target_protocol: "{{ proxy_target_split_protocol[0] }}"
|
||||
when: proxy_target_split_protocol | length == 2
|
||||
- name: Split legacy proxy_target to protocol and target
|
||||
set_fact:
|
||||
proxy_target_split_protocol: "{{ proxy_target.split('://') }}"
|
||||
- name: Split target further to host and port
|
||||
set_fact:
|
||||
proxy_target_split_host: "{{ (proxy_target_split_protocol | last).split(':') }}"
|
||||
- name: Set host and port variables
|
||||
set_fact:
|
||||
proxy_target_host: "{{ proxy_target_split_host[0] }}"
|
||||
proxy_target_port: "{{ proxy_target_split_host[1] }}"
|
||||
|
||||
- name: Set proxy_target_protocol based on proxy_target
|
||||
set_fact:
|
||||
proxy_target_protocol: "{{ proxy_target_split_protocol[0] }}"
|
||||
when: proxy_target_split_protocol | length == 2
|
||||
when: proxy_target is defined and proxy_target_port is not defined
|
||||
|
||||
- name: configure vhost for reverse proxy
|
||||
include_role:
|
||||
include_role:
|
||||
name: vhost
|
||||
vars:
|
||||
vhost_type: reverse_proxy
|
||||
|
||||
|
||||
@@ -2,4 +2,3 @@
|
||||
|
||||
reverse_proxy_type: caddy
|
||||
web_server: "{{ reverse_proxy_type }}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user