1 if FileTest.exist?('/usr/sbin/gnt-cluster') and FileTest.exist?('/var/lib/ganeti/ssconf_cluster_name')
3 if system('/usr/sbin/gnt-cluster getmaster >/dev/null')
4 Facter.add('cluster') do
6 open('/var/lib/ganeti/ssconf_cluster_name').read().chomp()
9 Facter.add('cluster_nodes') do
11 open('/var/lib/ganeti/ssconf_node_list').read().split().join(" ")