From 03751baf8e426ea45c47167357ec0f9278134a8e Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Fri, 21 Nov 2014 18:18:15 -0500 Subject: add custom fact, providing ssh_version --- lib/facter/ssh_version.rb | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 lib/facter/ssh_version.rb (limited to 'lib/facter') diff --git a/lib/facter/ssh_version.rb b/lib/facter/ssh_version.rb new file mode 100644 index 0000000..eb157ce --- /dev/null +++ b/lib/facter/ssh_version.rb @@ -0,0 +1,5 @@ +Facter.add("ssh_version") do + setcode do + ssh_version = Facter::Util::Resolution.exec('ssh -V 2>&1').chomp.split(' ')[0].split('_')[1] + end +end -- cgit v1.2.3