From 3b623df1f88adf2a177829dacae822dec2c3c7d0 Mon Sep 17 00:00:00 2001 From: Lebedev Vadim Date: Wed, 29 Jun 2016 18:54:03 +0300 Subject: * add shorewal version facter --- lib/facter/shorewall_major_version.rb | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 lib/facter/shorewall_major_version.rb (limited to 'lib/facter/shorewall_major_version.rb') diff --git a/lib/facter/shorewall_major_version.rb b/lib/facter/shorewall_major_version.rb new file mode 100644 index 0000000..a733842 --- /dev/null +++ b/lib/facter/shorewall_major_version.rb @@ -0,0 +1,5 @@ +Facter.add("shorewall_major_version") do + setcode do + Facter::Util::Resolution.exec('shorewall version').split('.')[0] || nil + end +end -- cgit v1.2.3