blob: c57ea0b1d77399d1ed504f8bdd66dd29b80d4aeb (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
---
## TODO: pin version
- name: install apt packages
apt:
name: prom-exporter-ssl
state: present
- name: create config directory
file:
path: /etc/prometheus/exporter/ssl
state: directory
- name: generate configuration
template:
src: config.yml.j2
dest: /etc/prometheus/exporter/ssl/config.yml
notify: restart prometheus-ssl-exporter
- name: generate systemd service unit
template:
src: service.j2
dest: /etc/systemd/system/prometheus-ssl-exporter.service
notify: restart prometheus-ssl-exporter
- name: make sure prometheus-ssl-exporter is enabled and started
systemd:
name: prometheus-ssl-exporter.service
daemon_reload: yes
state: started
enabled: yes
- name: register exporter
copy:
content: |
location = /ssl {
proxy_pass http://127.0.0.1:9219/metrics;
}
location = /ssl/probe {
proxy_pass http://127.0.0.1:9219/probe;
}
dest: /etc/prometheus/exporter/ssl.locations
notify: reload nginx
|