aboutsummaryrefslogtreecommitdiff
path: root/lib/facter
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2014-11-21 18:18:15 -0500
committerMicah Anderson <micah@riseup.net>2014-11-21 18:18:15 -0500
commit03751baf8e426ea45c47167357ec0f9278134a8e (patch)
treebcb1dba40c8cfc998ea6e6977d4d56cfe5e33a7b /lib/facter
parentae9cf81188a0fb4f14a519c1ca97ed8f9789abd4 (diff)
downloadpuppet-sshd-03751baf8e426ea45c47167357ec0f9278134a8e.tar.gz
puppet-sshd-03751baf8e426ea45c47167357ec0f9278134a8e.tar.bz2
add custom fact, providing ssh_version
Diffstat (limited to 'lib/facter')
-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