puppet-nova/lib/facter/libvirt_uuid.rb
Oleksiy Molchanov 8bf30c41e9 Add host_uuid to libvirtd.conf
Add host_uuid generated by uuidgen to libvirtd.conf

Change-Id: Ib060bff4b1f547b4db255969bc8cb3119a85ba6d
Closes-Bug: 1378962
2016-01-08 13:56:09 +02:00

12 lines
209 B
Ruby

require 'facter'
Facter.add(:libvirt_uuid) do
setcode do
uuid_file_path = '/etc/libvirt/libvirt_uuid'
if File.file? uuid_file_path
File.read uuid_file_path
else
nil
end
end
end