-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy patheventautoprep.yml
60 lines (50 loc) · 1.73 KB
/
eventautoprep.yml
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
---
- hosts: all
name: Prep Prometheus to scrape more often on Tower metrics
gather_facts: false
tasks:
- name: Updated prometheus config
ansible.builtin.template:
src: templates/prometheus.yml.j2
dest: /etc/prometheus/prometheus.yml
notify: restart_prometheus
- name: Updated cpu-alert rules
ansible.builtin.template:
src: templates/cpu-rules.yml.j2
dest: /etc/prometheus/rules/cpu-rules.yml
notify: restart_prometheus
- name: Updated disk-rules
ansible.builtin.template:
src: templates/disk-rules.yml.j2
dest: /etc/prometheus/rules/disk-rules.yml
notify: restart_prometheus
- name: Updated mem-rules
ansible.builtin.template:
src: templates/mem-rules.yml.j2
dest: /etc/prometheus/rules/mem-rules.yml
notify: restart_prometheus
- name: Updated exporter-rules
ansible.builtin.template:
src: templates/exporter-rules.yml.j2
dest: /etc/prometheus/rules/exporter-rules.yml
notify: restart_prometheus
- name: Updated selinux-rules
ansible.builtin.template:
src: templates/selinux-rules.yml.j2
dest: /etc/prometheus/rules/selinux-rules.yml
notify: restart_prometheus
- name: Updated iis-rules
ansible.builtin.template:
src: templates/iis-rules.yml.j2
dest: /etc/prometheus/rules/iis-rules.yml
notify: restart_prometheus
- name: Updated disk-usage
ansible.builtin.template:
src: templates/disk-usage.yml.j2
dest: /etc/prometheus/rules/disk-usage.yml
notify: restart_prometheus
handlers:
- name: restart_prometheus
ansible.builtin.service:
name: prometheus
state: restarted