-
Notifications
You must be signed in to change notification settings - Fork 0
/
prometheus_playbook.yml
52 lines (47 loc) · 1.71 KB
/
prometheus_playbook.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
---
- name: Install package
hosts: tlv-a2
become: true
vars:
packages:
- prometheus
- alertmanager
- blackbox_exporter
wget:
prometheus: https://github.com/prometheus/prometheus/releases/download/v2.34.0/prometheus-2.34.0.linux-amd64.tar.gz
node_exporter: https://github.com/prometheus/node_exporter/releases/download/v1.3.1/node_exporter-1.3.1.linux-amd64.tar.gz
pushgateway: https://github.com/prometheus/pushgateway/releases/download/v1.4.2/pushgateway-1.4.2.linux-amd64.tar.gz
blackbox_exporter: https://github.com/prometheus/blackbox_exporter/releases/download/v0.20.0/blackbox_exporter-0.20.0.linux-amd64.tar.gz
alertmanager: https://github.com/prometheus/alertmanager/releases/download/v0.24.0/alertmanager-0.24.0.linux-amd64.tar.gz
dest: /usr/local/src
tasks:
- name: Download prometheus
get_url:
url: "{{ wget.prometheus }}"
dest: "{{ dest }}"
loop: "{{ packages }}"
when: item == "prometheus"
- name: Download node_exporter
get_url:
url: "{{ wget.node_exporter }}"
dest: "{{ dest }}"
loop: "{{ packages }}"
when: item == "node_exporter"
- name: Download pushgateway
get_url:
url: "{{ wget.pushgateway }}"
dest: "{{ dest }}"
loop: "{{ packages }}"
when: item == "pushgateway"
- name: Download blackbox_exporter
get_url:
url: "{{ wget.blackbox_exporter }}"
dest: "{{ dest }}"
loop: "{{ packages }}"
when: item == "blackbox_exporter"
- name: Download alertmanager
get_url:
url: "{{ wget.alertmanager }}"
dest: "{{ dest }}"
loop: "{{ packages }}"
when: item == "alertmanager"