roles/nginx/proxy: Reworked proxy to adapt to upstreams

wip
Felix Stupp 6 years ago
parent bdf96b6eeb
commit 7d8be15582
Signed by: zocker
GPG Key ID: 93E1BD26F6B02FB7

@ -1,5 +1,4 @@
--- ---
# domain: example.com # domain: example.com
# backend: 12345 or /example.socket # backend_port: 12345 OR backend_socket: /example.socket
type: port # port / socket

@ -4,5 +4,4 @@ allow_duplicates: yes
dependencies: dependencies:
- role: acme/certificate - role: acme/certificate
- role: "nginx/{{ type }}_upstream" - role: nginx/upstream
backend: "{{ backend }}"

@ -1,6 +1,6 @@
--- ---
- name: Configure proxy for {{ domain }} to {{ type }} {{ backend }} - name: Configure proxy for {{ domain }} to {{ backend_port is defined | ternary(backend_port, backend_socket) }}
template: template:
src: proxy.conf src: proxy.conf
dest: "{{ nginx_sites_directory }}/{{ domain }}" dest: "{{ nginx_sites_directory }}/{{ domain }}"

Loading…
Cancel
Save