Alexandros Kosiaris has submitted this change and it was merged. ( 
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(-)

Approvals:
  Alexandros Kosiaris: Verified; Looks good to me, approved



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: merged
Gerrit-Change-Id: I0095820f1014cc44f48b85be1c86f1083dd62a16
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris <[email protected]>
Gerrit-Reviewer: Alexandros Kosiaris <[email protected]>
Gerrit-Reviewer: Giuseppe Lavagetto <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to