aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/facter/ssh_version.rb5
1 files changed, 5 insertions, 0 deletions
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