Create a gist now

Instantly share code, notes, and snippets.

Puppet fact for Operating System Major Release
Facter.add("operatingsystemmajrelease") do
setcode do
begin
Facter.operatingsystemrelease
rescue
Facter.loadfacts()
end
Facter.value('operatingsystemrelease').split('.')[0,1]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment