File tree 4 files changed +1569
-0
lines changed
4 files changed +1569
-0
lines changed Original file line number Diff line number Diff line change @@ -49,3 +49,5 @@ dependencies:
49
49
when : is_local is not defined or not is_local
50
50
- role : debian/bash
51
51
when : is_local is not defined or not is_local
52
+ - role : debian/collectd
53
+ when : is_local is not defined or not is_local
Original file line number Diff line number Diff line change
1
+ # CollectD
2
+ This role provides the collectd server statistics daemon facilitating exporting of system stats to cloudwatch
3
+
4
+ <!-- TOC-->
5
+ <!-- ENDTOC-->
6
+
7
+ <!-- ROLEVARS-->
8
+ <!-- ENDROLEVARS-->
Original file line number Diff line number Diff line change
1
+ ---
2
+ - name : Check if we already have collectd installed.
3
+ ansible.builtin.stat :
4
+ path : " /usr/sbin/collectd"
5
+ register : collectd_bin
6
+
7
+ - name : Check if collectd config directory exists.
8
+ ansible.builtin.stat :
9
+ path : " /etc/collectd"
10
+ register : collectd_configdir
11
+
12
+ - name : Install collectd if not installed.
13
+ ansible.builtin.apt :
14
+ pkg : collectd
15
+ state : present
16
+ when :
17
+ - not collectd_bin.stat.exists
18
+
19
+ - name : Create collectd config directory.
20
+ ansible.builtin.file :
21
+ path : /etc/collectd
22
+ state : directory
23
+ mode : ' 0755'
24
+ when :
25
+ - not collectd_configdir.stat.exists
26
+
27
+ - name : Place collectd configuration.
28
+ ansible.builtin.template :
29
+ src : " collectd.conf.j2"
30
+ dest : " /etc/collectd/collectd.conf"
31
+ owner : root
32
+ group : root
33
+ mode : 0644
34
+ force : true
35
+ when :
36
+ - collectd_configdir.stat.exists
You can’t perform that action at this time.
0 commit comments