[icinga-checkins] icinga.org: icinga2-ansible/master: Include handler for Apache only when icinga2-classicui is going to be installed

git at icinga.org git at icinga.org
Mon Jun 9 00:28:07 CEST 2014


Module: icinga2-ansible
Branch: master
Commit: c8008828e129aaf82eaf407587fe34401cf5d10a
URL:    https://git.icinga.org/?p=icinga2-ansible.git;a=commit;h=c8008828e129aaf82eaf407587fe34401cf5d10a

Author: Valentino Gagliardi <valentino.g at servermanaged.it>
Date:   Mon Jun  9 00:24:20 2014 +0200

Include handler for Apache only when icinga2-classicui is going to be installed

---

 handlers/apache.yml |    7 +++++++
 handlers/main.yml   |    6 ++----
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/handlers/apache.yml b/handlers/apache.yml
new file mode 100644
index 0000000..4022c9f
--- /dev/null
+++ b/handlers/apache.yml
@@ -0,0 +1,7 @@
+---
+# handlers file for icinga2-ansible
+
+- name: restart apache
+  service: name={{ apache }}
+           state=restarted
+           enabled=yes
diff --git a/handlers/main.yml b/handlers/main.yml
index 4df7a98..97d1f1e 100644
--- a/handlers/main.yml
+++ b/handlers/main.yml
@@ -11,10 +11,8 @@
            state=reloaded 
            enabled=yes
 
-- name: restart apache
-  service: name={{ apache }} 
-           state=restarted 
-           enabled=yes
+- include: apache.yml
+  when: icinga2_classicui == 'yes'
 
 - include: firewalld.yml
   when: ansible_os_family == 'RedHat' and ansible_distribution == 'Fedora'



More information about the icinga-checkins mailing list