45 lines
1.1 KiB
YAML
45 lines
1.1 KiB
YAML
- hosts: muninservers
|
|
vars:
|
|
nginx_domain: "munin.afpy.org"
|
|
nginx_certificates: ["{{ nginx_domain }}"]
|
|
nginx_conf: |
|
|
server
|
|
{
|
|
listen 80;
|
|
listen [::]:80;
|
|
server_name {{ nginx_domain }};
|
|
return 301 https://$server_name$request_uri;
|
|
}
|
|
|
|
server
|
|
{
|
|
listen 443 ssl;
|
|
listen [::]:443 ssl;
|
|
server_name {{ nginx_domain }};
|
|
root /var/cache/munin/www;
|
|
index index.html;
|
|
|
|
include snippets/letsencrypt-{{ nginx_domain }}.conf;
|
|
|
|
location / {
|
|
try_files $uri $uri/ =404;
|
|
autoindex on;
|
|
}
|
|
|
|
location ^~ /munin-cgi/munin-cgi-graph/ {
|
|
fastcgi_split_path_info ^(/munin-cgi/munin-cgi-graph)(.*);
|
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
|
fastcgi_pass unix:/var/run/munin/fcgi-graph.sock;
|
|
include fastcgi_params;
|
|
}
|
|
}
|
|
|
|
roles:
|
|
- munin_server
|
|
- nginx
|
|
|
|
- hosts: all
|
|
roles:
|
|
- common # For nftables's *_NEIGHBORS
|
|
- munin_client
|