-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathPromgraf.yml
53 lines (47 loc) · 1.22 KB
/
Promgraf.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
---
- name: Install Prometheus and Grafana
hosts: all
vars:
- prometheus_components:
- prometheus
- node_exporter
- alertmanager
- tower_scrape: 5m
- prometheus_version: latest
- alertmanager_version: latest
- nodeexporter_version: latest
# If issues arise with grafana yum install, then manually install
# update /etc/yum.repos.d/grafana.repo to the info below
# [grafana]
# name=grafana
# baseurl=https://packages.grafana.com/oss/rpm
# repo_gpgcheck=1
# enabled=1
# gpgcheck=1
# gpgkey=https://packages.grafana.com/gpg.key
# sslverify=1
# sslcacert=/etc/pki/tls/certs/ca-bundle.crt
# Then run yum install grafana
roles:
- prometheus
- lrk.grafana
collections:
- ansible.posix
tasks:
- name: Open Firewalld for grafana
ansible.posix.firewalld:
port: 9090/tcp
permanent: true
state: enabled
notify: restart_firewalld
- name: Open Firewalld for prometheus
ansible.posix.firewalld:
port: 3000/tcp
permanent: true
state: enabled
notify: restart_firewalld
handlers:
- name: restart_firewalld
ansible.builtin.service:
name: firewalld
state: restarted