1 2 3 4 5 6 7
Facter.add("shorewall_major_version") do confine :shorewall_version => /\d/ setcode do v = Facter.value('shorewall_version') v.nil? ? nil : v.split('.').first end end