diff options
author | Micah Anderson <micah@riseup.net> | 2014-11-21 18:18:15 -0500 |
---|---|---|
committer | Micah Anderson <micah@riseup.net> | 2014-11-21 18:18:15 -0500 |
commit | 03751baf8e426ea45c47167357ec0f9278134a8e (patch) | |
tree | bcb1dba40c8cfc998ea6e6977d4d56cfe5e33a7b /lib/facter | |
parent | ae9cf81188a0fb4f14a519c1ca97ed8f9789abd4 (diff) | |
download | puppet-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.rb | 5 |
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 |