From f89ce31b9138d35eec0fb02b31614ac007fd1b0b Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Mon, 9 Nov 2015 17:49:49 +0000 Subject: [PATCH] And some more --- roles/collectd/base/tasks/main.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/roles/collectd/base/tasks/main.yml b/roles/collectd/base/tasks/main.yml index 399a060e8a..15502678cc 100644 --- a/roles/collectd/base/tasks/main.yml +++ b/roles/collectd/base/tasks/main.yml @@ -6,6 +6,14 @@ yum: name=collectd state=present tags: - collectd + when: ansible_distribution_major_version|int < 22 + +# install pkg +- name: install collectd + dnf: name=collectd state=present + tags: + - collectd + when: ansible_distribution_major_version|int > 21 # enable collectd - name: enable collectd svc @@ -41,7 +49,7 @@ # apache - localhost only - pretty much any apache server - name: install collectd-apache - yum: state=present name=collectd-apache + yum: state=present name=collectd-apache and ansible_distribution_major_version|int < 22 tags: - collectd notify: @@ -70,7 +78,7 @@ yum: name=libsemanage-python state=present tags: - collectd - when: collectd_apache is defined + when: collectd_apache is defined and ansible_distribution_major_version|int < 22 - name: Let collectd talk to things over tcp seboolean: name=collectd_tcp_network_connect state=yes persistent=yes