[icinga-checkins] icinga.org: icinga2-ansible/master: Added checks_all draft

git at icinga.org git at icinga.org
Sat Jun 7 13:16:05 CEST 2014


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

Author: Valentino Gagliardi <valentino.g at servermanaged.it>
Date:   Mon Jun  2 00:48:19 2014 +0200

Added checks_all draft

---

 templates/host_def.j2 |   10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/templates/host_def.j2 b/templates/host_def.j2
index 6c3400f..d4d9a48 100644
--- a/templates/host_def.j2
+++ b/templates/host_def.j2
@@ -24,3 +24,13 @@ object Host "{{ hostvars[host]['ansible_fqdn'] }}" {
   vars.http = "yes"
 }
 {% endfor %}
+
+{% for host in groups['checks_all'] %}
+object Host "{{ hostvars[host]['ansible_fqdn'] }}" {
+  import "generic-host"
+  address = "{{ hostvars[host]['ansible_eth0']['ipv4']['address'] }}"
+  #This host will be monitored for http, smtp and ping
+  vars.http = "yes"
+  vars.smtp = "yes"
+}
+{% endfor %}



More information about the icinga-checkins mailing list