]> git.donarmstrong.com Git - dsa-puppet.git/commitdiff
make motd a little nicer
authorStephen Gran <steve@lobefin.net>
Sun, 30 Sep 2012 16:28:46 +0000 (17:28 +0100)
committerStephen Gran <steve@lobefin.net>
Sun, 30 Sep 2012 16:28:46 +0000 (17:28 +0100)
Signed-off-by: Stephen Gran <steve@lobefin.net>
modules/motd/templates/motd.erb

index 2430bb1dd7020ffcc7192a1fd90bd00c49f5eeb9..e18d58ce3babe0c1d0ba5fe25b19531eb5b2f2bf 100644 (file)
@@ -69,7 +69,12 @@ end
 purp += "\n"
 
 if (scope.lookupvar('site::nodeinfo')['ldap'].has_key?('physicalHost'))
-  purp += wrap("This virtual server runs on the physical host #{ninfo['ldap']['physicalHost'][0]}, " +
+  if ninfo['ldap']['physicalHost'][0] =~ /ganeti/
+    phys_host = 'cluster'
+  else
+    phys_host = 'physical host'
+  end
+  purp += wrap("This virtual server runs on the #{phys_host} #{ninfo['ldap']['physicalHost'][0]}, " +
                "which is hosted at #{ninfo['hoster']['longname']}."
                )
 elsif scope.lookupvar('site::nodeinfo')['hoster']['name']