Andrew Bogott has uploaded a new change for review.

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

Change subject: Add a stupid hack for determining whether or not a labs box is 
bare metal.
......................................................................

Add a stupid hack for determining whether or not a labs box is bare metal.

Why not use facter's $::is_virtual?  Because it's broken.
As is facter's $::virtual.

Change-Id: I817b0eec9673c4ae61609bea35dbe9b3281d2da5
---
M manifests/realm.pp
1 file changed, 10 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/76/258176/1

diff --git a/manifests/realm.pp b/manifests/realm.pp
index 7848a78..e8966e9 100644
--- a/manifests/realm.pp
+++ b/manifests/realm.pp
@@ -21,6 +21,16 @@
     if $::projectgroup == undef {
         $projectgroup = "project-${labsproject}"
     }
+
+    if $::labsprojectfrommetadata == undef {
+        # If we are in $::realm labs and don't have a metadata service,
+        #  we're probably a bare-metal instance.
+        # This is stupid, but facter is broken and sets $::is_virtual
+        #  incorrectly so this is my best bet about how to decide this.
+        $is_labs_baremetal = true
+    } else {
+        $is_labs_baremetal = false
+    }
 }
 
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I817b0eec9673c4ae61609bea35dbe9b3281d2da5
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott <[email protected]>

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

Reply via email to