From 8bf3bbdeb181f03eb7f8fb4c25405c47c7fe4e5b Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Sun, 10 Dec 2023 00:18:44 -0500 Subject: [PATCH] Enable Prometheus exporter on nodes by default --- group_vars/default/base.yml | 3 +++ roles/base/defaults/main.yml | 2 ++ roles/base/tasks/main.yml | 6 ++++++ 3 files changed, 11 insertions(+) diff --git a/group_vars/default/base.yml b/group_vars/default/base.yml index d00671e..4b78e1d 100644 --- a/group_vars/default/base.yml +++ b/group_vars/default/base.yml @@ -28,6 +28,9 @@ debian_main_repository: http://ftp.debian.org/debian debian_security_repository: http://security.debian.org debian_pvc_repository: https://repo.parallelvirtualcluster.org/debian +# Enable Prometheus metric reporting from PVC nodes (installs prometheus-node-exporter) +enable_prometheus_exporter: yes + # Root user password # > Use pwgen to generate root_password: "" diff --git a/roles/base/defaults/main.yml b/roles/base/defaults/main.yml index 89f999f..296cc63 100644 --- a/roles/base/defaults/main.yml +++ b/roles/base/defaults/main.yml @@ -25,3 +25,5 @@ fail2ban_ignorelist: - 10.0.0.0/8 cpu_governor: "ondemand" + +enable_prometheus_exporter: yes diff --git a/roles/base/tasks/main.yml b/roles/base/tasks/main.yml index 9047e66..6a70147 100644 --- a/roles/base/tasks/main.yml +++ b/roles/base/tasks/main.yml @@ -296,6 +296,12 @@ until: apt_res is success tags: base-packages +- name: install Prometheus node exporter if enabled + apt: + name: + - prometheus-node-exporter + when: enable_prometheus_exporter is defined and enable_prometheus_exporter + - name: install Intel-specific microcode package apt: name: