Showing with 17 additions and 1 deletion.
  1. +16 −0 lib/facter/ssh.rb
  2. +1 −1 metadata.json
16 changes: 16 additions & 0 deletions lib/facter/ssh.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Facter.add('ssh_version') do
setcode do
if Facter::Util::Resolution.which('ssh')
Facter::Util::Resolution.exec('ssh -V 2>&1').match(/^[A-Za-z0-9._]+/)[0]
end
end
end

Facter.add('ssh_version_numeric') do
setcode do
ssh_version = Facter.value(:ssh_version)
if ssh_version
ssh_version.match(/\d+\.\d+/)[0]
end
end
end
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ghoneycutt-ssh",
"version": "3.34.0",
"version": "3.35.0",
"author": "ghoneycutt",
"summary": "Manages SSH",
"license": "Apache-2.0",
Expand Down