parent
fbbe86c651
commit
db5d1fb91a
|
@ -0,0 +1 @@
|
|||
unifi_server_name: '{{ ansible_fqdn }}'
|
|
@ -1,4 +1,8 @@
|
|||
nginx_redirect_http_https: true
|
||||
unifi_server_name: unifi.pyrocufflink.blue
|
||||
unifi_caddy_acme:
|
||||
email: unifi@pyrocufflink.net
|
||||
url: https://ca.pyrocufflink.blue/acme/acme/directory
|
||||
|
||||
unifi_exporter_site: Pyrocufflink
|
||||
unifi_exporter_username: prometheus
|
||||
unifi_exporter_password: !vault |
|
||||
|
|
|
@ -30,23 +30,12 @@
|
|||
tags:
|
||||
- firewalld
|
||||
|
||||
- name: ensure nginx is configured to proxy for unifi
|
||||
- name: ensure caddy is configured to proxy for unifi
|
||||
template:
|
||||
src: unifi.nginx.conf.j2
|
||||
dest: /etc/nginx/default.d/unifi.conf
|
||||
mode: u=rw,go=r
|
||||
src: unifi.caddyfile.j2
|
||||
dest: /etc/caddy/Caddyfile.d/unifi.caddyfile
|
||||
owner: root
|
||||
group: root
|
||||
mode: u=rw,go=r
|
||||
notify:
|
||||
- reload nginx
|
||||
tags:
|
||||
- nginx
|
||||
|
||||
- name: ensure selinux allows nginx to proxy for unifi
|
||||
seboolean:
|
||||
name: httpd_can_network_connect
|
||||
persistent: true
|
||||
state: true
|
||||
tags:
|
||||
- nginx
|
||||
- selinux
|
||||
- reload caddy
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
{{ unifi_server_name }} {
|
||||
reverse_proxy localhost:8443 {
|
||||
transport http {
|
||||
tls_insecure_skip_verify
|
||||
}
|
||||
}
|
||||
{% if unifi_caddy_acme|d %}
|
||||
|
||||
tls {{ unifi_caddy_acme.email }} {
|
||||
ca {{ unifi_caddy_acme.url }}
|
||||
}
|
||||
{% endif %}
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
location / {
|
||||
proxy_pass https://127.0.0.1:8443/;
|
||||
proxy_ssl_verify off;
|
||||
client_max_body_size 50m;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
}
|
Loading…
Reference in New Issue