File: libvirt_uuid.rb

package info (click to toggle)
puppet-module-nova 25.0.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,100 kB
  • sloc: ruby: 11,433; python: 38; sh: 10; makefile: 10
file content (11 lines) | stat: -rw-r--r-- 209 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
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