From 7d29f1c153c0d2423f9a44186cdd7067aa034c6a Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Wed, 5 Nov 2014 15:40:47 +0000 Subject: [PATCH] Try to install our fi-collectd module if it is not installed. --- roles/collectd/base/tasks/main.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/roles/collectd/base/tasks/main.yml b/roles/collectd/base/tasks/main.yml index 48a3dac3cc..73ca208e14 100644 --- a/roles/collectd/base/tasks/main.yml +++ b/roles/collectd/base/tasks/main.yml @@ -69,12 +69,17 @@ tags: - collectd -- name: install our custom selinux module - command: semodule -i /usr/share/collectd/fi-collectd.pp - when: selinux_module|changed +- name: check to see if its even installed yet + shell: semodule -l | grep fi-collectd + register: selinux_grep + tags: + - collectd + +- name: install our custom selinux module + command: semodule -i /usr/share/collectd/fi-collectd.pp + when: selinux_module|changed or selinux_grep|failed tags: - collectd - ignore_errors: True