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
# backend: 12345 or /example.socket
type: port # port / socket
# backend_port: 12345 OR backend_socket: /example.socket

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

@ -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:
src: proxy.conf
dest: "{{ nginx_sites_directory }}/{{ domain }}"

Loading…
Cancel
Save