aboutsummaryrefslogtreecommitdiffstats
path: root/roles/prometheus
diff options
context:
space:
mode:
Diffstat (limited to 'roles/prometheus')
-rw-r--r--roles/prometheus/tasks/main.yml6
1 files changed, 3 insertions, 3 deletions
diff --git a/roles/prometheus/tasks/main.yml b/roles/prometheus/tasks/main.yml
index ba5095b..e5a01ce 100644
--- a/roles/prometheus/tasks/main.yml
+++ b/roles/prometheus/tasks/main.yml
@@ -8,7 +8,7 @@
package: name=prometheus state=present
- name: install node_exporter
- package: name="{{ packages[os_distribution].node_exporter }}" state=present
+ package: name="{{ packages[ansible_distribution | lower].node_exporter }}" state=present
- name: generate prometheus configuration
template:
@@ -23,8 +23,8 @@
- name: start and enable node_exporter
service: name=node_exporter state=restarted enabled=true
- when: os_type == "bsd"
+ when: ansible_distribution in "OpenBSD FreeBSD"
- name: start and enable node_exporter
service: name=node-exporter state=restarted enabled=true
- when: os_type != "bsd"
+ when: ansible_distribution not in "OpenBSD FreeBSD"
remember that computers suck.