summaryrefslogtreecommitdiff
path: root/puppet
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2014-02-18 17:34:27 +0100
committervarac <varacanero@zeromail.org>2014-02-18 17:34:27 +0100
commit0e52976bf9e1cb907a2730a78dded0ef8fb2410a (patch)
tree43ba485523eb7602e37b323791f27c15b57fa5ea /puppet
parentbd7a0f98ce0819fcc06ad8dcf11600a78577750d (diff)
parent2436fddb4a63075f74f295bacd23128c766beb4c (diff)
Merge branch '5132_Remove_adding_of_hosts_from_site_nagios' into 0.6
Diffstat (limited to 'puppet')
-rw-r--r--puppet/modules/site_check_mk/manifests/server.pp2
-rw-r--r--puppet/modules/site_nagios/manifests/add_host_services.pp (renamed from puppet/modules/site_nagios/manifests/add_host.pp)8
-rw-r--r--puppet/modules/site_nagios/manifests/server.pp2
3 files changed, 3 insertions, 9 deletions
diff --git a/puppet/modules/site_check_mk/manifests/server.pp b/puppet/modules/site_check_mk/manifests/server.pp
index 625fc688..e77862e5 100644
--- a/puppet/modules/site_check_mk/manifests/server.pp
+++ b/puppet/modules/site_check_mk/manifests/server.pp
@@ -8,7 +8,7 @@ class site_check_mk::server {
$nagios_hiera = hiera_hash('nagios')
$hosts = $nagios_hiera['hosts']
- $all_hosts = inline_template("<% @hosts.keys.sort.each do |key| -%>\"<%= key %>\", <% end -%>")
+ $all_hosts = inline_template ('<% @hosts.keys.sort.each do |key| -%>"<%= @hosts[key]["domain_internal"] %>", <% end -%>')
package { 'check-mk-server':
ensure => installed,
diff --git a/puppet/modules/site_nagios/manifests/add_host.pp b/puppet/modules/site_nagios/manifests/add_host_services.pp
index 94352de4..2d615ff1 100644
--- a/puppet/modules/site_nagios/manifests/add_host.pp
+++ b/puppet/modules/site_nagios/manifests/add_host_services.pp
@@ -1,4 +1,4 @@
-define site_nagios::add_host (
+define site_nagios::add_host_services (
$domain_internal,
$ip_address,
$services,
@@ -6,12 +6,6 @@ define site_nagios::add_host (
$nagios_hostname = $domain_internal
- # Add Nagios host
- nagios_host { $nagios_hostname:
- address => $ip_address,
- use => 'generic-host',
- }
-
# Add Nagios service
# First, we need to turn the serice array into hash, using a "hash template"
diff --git a/puppet/modules/site_nagios/manifests/server.pp b/puppet/modules/site_nagios/manifests/server.pp
index b1795826..ca38d7fc 100644
--- a/puppet/modules/site_nagios/manifests/server.pp
+++ b/puppet/modules/site_nagios/manifests/server.pp
@@ -43,7 +43,7 @@ class site_nagios::server inherits nagios::base {
group => 'nagios',
}
- create_resources ( site_nagios::add_host, $hosts )
+ create_resources ( site_nagios::add_host_services, $hosts )
include site_nagios::server::apache
include site_check_mk::server