Signed-off-by: Stephen Gran <steve@lobefin.net>
end
-if scope.lookupvar('::cluster').to_s != 'undefined'
+if scope.lookupvar('::cluster')
purp += "\n This server is a node in ganeti cluster: "
purp += scope.lookupvar('::cluster').to_s + ":\n"
purp += "\t" + scope.lookupvar('::cluster_nodes').split.sort.map{ |x| x.split('.')[0] }.join(", ") + ".\n"
%>
<%=
ganetikeys = []
- if scope.lookupvar('::cluster').to_s != 'undefined'
+ if scope.lookupvar('::cluster')
scope.lookupvar('::cluster_nodes').split.sort.each do |node|
if allnodeinfo.has_key?(node)
ganetikeys << "# for ganeti cluster #{scope.lookupvar('::cluster').to_s}: #{allnodeinfo[node]['hostname'][0]}"