1 if FileTest.exist?('/usr/sbin/gnt-cluster') and FileTest.exist?('/var/lib/ganeti/config.data')
3 if system('/usr/sbin/gnt-cluster getmaster >/dev/null')
5 yaml = YAML.load_file('/var/lib/ganeti/config.data')
6 Facter.add('cluster') do
8 yaml['cluster']['cluster_name']
11 Facter.add('cluster_nodes') do
13 yaml['nodes'].keys.join(' ')