blob: 91318f16ce87824f08cf19a20077f118254cd794 (
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-ipmi
state: present
- name: create config directory
file:
path: /etc/prometheus/exporter/ipmi
state: directory
- name: generate configuration
template:
src: config.yml.j2
dest: /etc/prometheus/exporter/ipmi/config.yml
notify: reload prometheus-ipmi-exporter
- name: generate systemd service unit
template:
src: service.j2
dest: /etc/systemd/system/prometheus-ipmi-exporter.service
notify: restart prometheus-ipmi-exporter
- name: make sure prometheus-ipmi-exporter is enabled and started
systemd:
name: prometheus-ipmi-exporter.service
daemon_reload: yes
state: started
enabled: yes
- name: register exporter
copy:
content: |
location = /ipmi {
proxy_pass http://127.0.0.1:9290/metrics;
}
location = /ipmi/remote {
proxy_pass http://127.0.0.1:9290/ipmi;
}
dest: /etc/prometheus/exporter/ipmi.locations
notify: reload nginx
|