Remove all host specific configs and add README
parent
224a3579ea
commit
47d4d919f5
|
@ -0,0 +1,24 @@
|
|||
# Summary
|
||||
|
||||
This provide a basic ansible role to deploy the prometheus node exporter.
|
||||
|
||||
Please note, this is not the most flexible role but fits well into my infrastructure. More
|
||||
configurations can be added easyly. Get in touch!
|
||||
|
||||
## Configuration
|
||||
|
||||
In order to use this role, you need to provide the following configuration:
|
||||
|
||||
### `node_exporter_domain`
|
||||
|
||||
This is the domain serving the API.
|
||||
|
||||
### `node_exporter_cert`
|
||||
|
||||
This specifies which domain should be used for SSL. Useful if you use wildcard
|
||||
certs. These are expected to live in `/etc/nginx/certs`.
|
||||
|
||||
### `prometheus_pass`
|
||||
|
||||
This specifies the HTTP Basic Auth password to secure the prometheus endpoint.
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
server {
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
server_name tech.ag-link.xyz;
|
||||
server_name {{ node_exporter_domain }};
|
||||
|
||||
ssl_certificate /etc/nginx/certs/ag-link.xyz/fullchain;
|
||||
ssl_certificate_key /etc/nginx/certs/ag-link.xyz/key;
|
||||
ssl_certificate /etc/nginx/certs/{{ node_exporter_cert }}/fullchain;
|
||||
ssl_certificate_key /etc/nginx/certs/{{ node_exporter_cert }}/key;
|
||||
ssl_session_timeout 1d;
|
||||
ssl_session_cache shared:SSL:50m;
|
||||
ssl_session_tickets off;
|
||||
|
@ -23,6 +23,6 @@ server {
|
|||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name tech.ag-link.xyz;
|
||||
return 301 https://tech.ag-link.xyz$request_uri;
|
||||
return 301 https://{{ node_exporter_domain }}$request_uri;
|
||||
}
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
become: yes
|
||||
copy:
|
||||
src: files/nginx.conf
|
||||
dest: /etc/nginx/conf.d/tech.ag-link.xyz.conf
|
||||
dest: /etc/nginx/conf.d/{{ prometheus_domain }}
|
||||
notify: Check and Reload nginx
|
||||
|
||||
- name: Install apache2-utils
|
||||
|
|
Loading…
Reference in New Issue