Mercurial > repos > other > Puppet
diff modules/ssh/lib/facter/ssh.rb @ 478:adf6fe9bbc17
Update Puppet modules to latest versions
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Thu, 29 Aug 2024 18:47:29 +0100 |
parents | d9009f54eb23 |
children |
line wrap: on
line diff
--- a/modules/ssh/lib/facter/ssh.rb Tue Aug 27 13:35:17 2024 +0100 +++ b/modules/ssh/lib/facter/ssh.rb Thu Aug 29 18:47:29 2024 +0100 @@ -1,7 +1,7 @@ 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] + Facter::Util::Resolution.exec('ssh -V 2>&1').match(%r{^[A-Za-z0-9._]+SSH[A-Za-z0-9._]+})[0] end end end @@ -10,7 +10,7 @@ setcode do ssh_version = Facter.value(:ssh_version) if ssh_version - ssh_version.match(/(\d+\.\d+\.\d+|\d+\.\d+)/)[0] + ssh_version.match(%r{(\d+\.\d+\.\d+|\d+\.\d+)})[0] end end end