2018-09-25 10:38:41 +02:00
|
|
|
server {
|
|
|
|
listen {{ lookup('dig', inventory_hostname, 'qtype=A') }}:9281 ssl;
|
|
|
|
listen [{{ lookup('dig', inventory_hostname, 'qtype=AAAA') }}]:9281 ssl;
|
|
|
|
server_name {{ inventory_hostname_short }}.{{ http_domain_external }} {{ inventory_hostname_short }}.{{ http_domain_internal }};
|
|
|
|
|
|
|
|
ssl_certificate /etc/nginx/ssl/{{ inventory_hostname_short }}.{{ http_domain_external }}/fullchain.pem;
|
|
|
|
ssl_certificate_key /etc/nginx/ssl/{{ inventory_hostname_short }}.{{ http_domain_external }}/privkey.pem;
|
|
|
|
|
|
|
|
include /etc/nginx/snippets/letsencrypt-acme-challenge.conf;
|
|
|
|
|
|
|
|
location / {
|
|
|
|
proxy_pass http://127.0.0.1:9281;
|
|
|
|
|
|
|
|
allow 127.0.0.0/8;
|
|
|
|
allow ::1/128;
|
2019-03-08 14:04:51 +01:00
|
|
|
{% for group in prometheus_groups %}
|
|
|
|
{% for host in groups[group] %}
|
2018-09-25 10:38:41 +02:00
|
|
|
allow {{ lookup('dig', host, 'qtype=A') }};
|
|
|
|
allow {{ lookup('dig', host, 'qtype=AAAA') }};
|
|
|
|
{% endfor %}
|
2019-03-08 14:04:51 +01:00
|
|
|
{% endfor %}
|
|
|
|
deny all;
|
2018-09-25 10:38:41 +02:00
|
|
|
}
|
|
|
|
}
|