Alexandros Kosiaris has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/315217

Change subject: Revert "Revert "icinga: Kill hostextinfo""
......................................................................

Revert "Revert "icinga: Kill hostextinfo""

Remove the spurious image argument that was added by mistake

This reverts commit 7c4a2de322f33870f3dbd74b250973c21802cb1f.

Change-Id: I8d1290bcfda3ee388c704690bf7d3397e23f3216
---
M modules/monitoring/manifests/host.pp
1 file changed, 18 insertions(+), 19 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/17/315217/1

diff --git a/modules/monitoring/manifests/host.pp 
b/modules/monitoring/manifests/host.pp
index fc7e06d..fd25292 100644
--- a/modules/monitoring/manifests/host.pp
+++ b/modules/monitoring/manifests/host.pp
@@ -33,6 +33,21 @@
     }
 
     # Export the nagios host instance
+    if $title == $::hostname {
+        $image = $::operatingsystem ? {
+            'Ubuntu'  => 'ubuntu',
+            'Debian'  => 'debian',
+            default   => 'linux40'
+        }
+        $icon_image      = "base/${image}.png"
+        $vrml_image      = "base/${image}.png"
+        $statusmap_image = "base/${image}.gd2"
+    } else {
+        $image = undef
+        $icon_image      = undef
+        $vrml_image      = undef
+        $statusmap_image = undef
+    }
     @@nagios_host { $title:
         ensure                => $ensure,
         target                => '/etc/nagios/puppet_hosts.cfg',
@@ -46,24 +61,8 @@
         notification_interval => 0,
         notification_period   => '24x7',
         notification_options  => 'd,u,r,f',
-    }
-
-    if $title == $::hostname {
-        $image = $::operatingsystem ? {
-            'Ubuntu'  => 'ubuntu',
-            'Debian'  => 'debian',
-            default   => 'linux40'
-        }
-
-        # Couple it with some hostextinfo
-        @@nagios_hostextinfo { $title:
-            ensure          => $ensure,
-            target          => '/etc/nagios/puppet_hostextinfo.cfg',
-            host_name       => $title,
-            notes           => $title,
-            icon_image      => "base/${image}.png",
-            vrml_image      => "base/${image}.png",
-            statusmap_image => "base/${image}.gd2",
-        }
+        icon_image            => $icon_image,
+        vrml_image            => $vrml_image,
+        statusmap_image       => $statusmap_image,
     }
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/315217
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8d1290bcfda3ee388c704690bf7d3397e23f3216
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris <akosia...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to