-
Notifications
You must be signed in to change notification settings - Fork 3
/
monitoring_exporter.yml
40 lines (34 loc) · 1 KB
/
monitoring_exporter.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
---
- hosts: all
vars:
# set below to an IP address you'd like to allow to read the xinetd files
ip_address: "123.123.123.123"
tasks:
- file:
path: "/opt/metrics.d"
state: directory
- apt:
pkg: [ "xinetd", "bc", "sysstat", "net-tools", "conntrack" ]
state: present
when:
- "ansible_distribution == 'Ubuntu' or ansible_distribution == 'Debian'"
- yum:
pkg: [ "xinetd", "bc", "sysstat", "net-tools", "conntrack-tools" ]
state: present
when:
- "ansible_distribution == 'CentOS' or ansible_distribution == 'CloudLinux'"
- copy:
src: "httpwrapper"
dest: "/opt/metrics.d/httpwrapper"
mode: 0755
- copy:
src: "exporter_monitoring"
dest: "/opt/metrics.d/exporter_monitoring"
mode: 0755
- template:
src: "exporter_monitoring.xinetd"
dest: "/etc/xinetd.d/exporter_monitoring"
- service:
name: xinetd
state: restarted
enabled: yes