summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Mistewicz <a.mistewicz@samsung.com>2017-09-06 11:19:17 (GMT)
committerPawel Wieczorek <p.wieczorek2@samsung.com>2018-11-19 14:20:16 (GMT)
commit10065b8aa877092b6a1a0f89b4cfa7fbeb37e193 (patch)
tree577db60072506e7e16f926a63bad76ede616ca40
parentc50b6cb6d1aca203422985133cb6d941e154836c (diff)
downloadhost-10065b8aa877092b6a1a0f89b4cfa7fbeb37e193.zip
host-10065b8aa877092b6a1a0f89b4cfa7fbeb37e193.tar.gz
host-10065b8aa877092b6a1a0f89b4cfa7fbeb37e193.tar.bz2
Add prometheus-node-exporterrefs/changes/38/185338/2
This change introduces a requirement on minimal Ubuntu version: 16.04 (Xenial). Change-Id: I8c0edf7f83127106c6baff015e7816b0e51267b8
-rw-r--r--config/hosts/master/roles/system/tasks/main.yml17
1 files changed, 17 insertions, 0 deletions
diff --git a/config/hosts/master/roles/system/tasks/main.yml b/config/hosts/master/roles/system/tasks/main.yml
index 5cacba1..e4dead7 100644
--- a/config/hosts/master/roles/system/tasks/main.yml
+++ b/config/hosts/master/roles/system/tasks/main.yml
@@ -20,6 +20,7 @@
- git
- sqlite3
- imagemagick
+ - prometheus-node-exporter
- name: Install testlab-major dependencies
apt: "name={{ item }} state=present force=yes"
@@ -136,3 +137,19 @@
git:
repo: git://github.com/tizen-artik/sdboot
dest: /opt/sdboot
+
+- name: Configure prometheus-node-exporter service
+ lineinfile:
+ dest: /etc/default/prometheus-node-exporter
+ state: present
+ regexp: '^ARGS'
+ line: 'ARGS="-collectors.enabled diskstats,filesystem,hwmon,loadavg,meminfo,netdev,netstat,stat,textfile,zfs --collector.textfile.directory /home/{{ username }}/ws/prom/"'
+ register: serviceargs
+
+- name: Restart prometheus-node-exporter service
+ systemd:
+ name: prometheus-node-exporter
+ daemon_reload: yes
+ state: restarted
+ enabled: True
+ when: serviceargs.changed