Alexandros Kosiaris has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/344347 )

Change subject: Add an $os parameter to monitoring::host
......................................................................

Add an $os parameter to monitoring::host

Add a new parameter to monitoring::host, defaulting to the value of the
$::operatingsystem fact. That maintains backwards compatibility while
allowing us to specify the operating system for devices where puppet
does not run on. Add the Junos operating system in the icons hash to
support juniper equipment

Change-Id: I0095820f1014cc44f48b85be1c86f1083dd62a16
---
M modules/monitoring/manifests/host.pp
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/47/344347/1

diff --git a/modules/monitoring/manifests/host.pp 
b/modules/monitoring/manifests/host.pp
index d111b94..ce4da35 100644
--- a/modules/monitoring/manifests/host.pp
+++ b/modules/monitoring/manifests/host.pp
@@ -3,6 +3,7 @@
 #
 define monitoring::host (
     $ip_address    = $::main_ipaddress,
+    $os            = $::operatingsystem,
     $host_fqdn     = undef,
     $group         = undef,
     $ensure        = present,
@@ -39,9 +40,10 @@
     # definition is also used for non-exported resources as well, this if guard
     # is required
     if $title == $::hostname {
-        $image = $::operatingsystem ? {
+        $image = $os ? {
             'Ubuntu'  => 'ubuntu',
             'Debian'  => 'debian',
+            'Junos'   => 'juniper',
             default   => 'linux40'
         }
         $icon_image      = "vendors/${image}.png"

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0095820f1014cc44f48b85be1c86f1083dd62a16
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to