15 lines
259 B
Ruby
15 lines
259 B
Ruby
Facter.add("osfamily") do
|
|
setcode do
|
|
distid = Facter.value('lsbdistid') || Facter.value('operatingsystem')
|
|
case distid
|
|
when /RedHat|CentOS|Fedora/
|
|
"redhat"
|
|
when "ubuntu"
|
|
"debian"
|
|
else
|
|
distid.downcase
|
|
end
|
|
end
|
|
end
|
|
|