aboutsummaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorbinary <me@rgoncalves.se>2021-03-11 16:01:06 +0100
committerbinary <me@rgoncalves.se>2021-03-11 16:01:06 +0100
commitcdf2b4afd31b10df695985d7bdd3a587534feb92 (patch)
treebc72ad7b8072fb523fb79158a70df84f4a7880be /roles
parentf5c14aadae9a0babff3a0df84765751b045a8dfe (diff)
downloadinfrastructure-cdf2b4afd31b10df695985d7bdd3a587534feb92.tar.gz
Use ansible distribution instead of in-house solution.
Diffstat (limited to 'roles')
-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.