puppet-standalone-mashup/shared/lib/facter/osfamily.rb

15 lines
259 B
Ruby
Raw Normal View History

2012-06-04 19:05:38 +00:00
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