Mercurial > repos > other > Puppet
view modules/ssh/lib/facter/ssh.rb @ 482:d83de9b3a62b default tip
Update hiera.yaml within Puppet config
Forgot that we manage it from here. Now has content to match
new packages
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Fri, 30 Aug 2024 16:10:36 +0100 |
parents | adf6fe9bbc17 |
children |
line wrap: on
line source
Facter.add('ssh_version') do setcode do if Facter::Util::Resolution.which('ssh') Facter::Util::Resolution.exec('ssh -V 2>&1').match(%r{^[A-Za-z0-9._]+SSH[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(%r{(\d+\.\d+\.\d+|\d+\.\d+)})[0] end end end