From 45d1971e3f62e7acc1c48efcc01166249aecafb0 Mon Sep 17 00:00:00 2001 From: Jason Alavaliant Date: Sun, 11 Oct 2026 10:48:05 +1300 Subject: [PATCH] Update facts to replace deprecated facter api usage --- lib/facter/ssh_client_version.rb | 4 ++-- lib/facter/ssh_server_version.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/facter/ssh_client_version.rb b/lib/facter/ssh_client_version.rb index 6876838e..a966fbe4 100644 --- a/lib/facter/ssh_client_version.rb +++ b/lib/facter/ssh_client_version.rb @@ -4,8 +4,8 @@ confine kernel: %w[Linux SunOS FreeBSD DragonFly Darwin] setcode do - if Facter::Util::Resolution.which('ssh') - version = Facter::Util::Resolution.exec('ssh -V 2>&1') + if Facter::Core::Execution.which('ssh') + version = Facter::Core::Execution.execute('ssh -V 2>&1') .lines .to_a .select { |line| line.match(%r{^OpenSSH_|^Sun_SSH_}) } diff --git a/lib/facter/ssh_server_version.rb b/lib/facter/ssh_server_version.rb index 0ec4b1cb..c1878ed7 100644 --- a/lib/facter/ssh_server_version.rb +++ b/lib/facter/ssh_server_version.rb @@ -4,11 +4,11 @@ confine kernel: %w[Linux SunOS FreeBSD DragonFly Darwin] setcode do - if Facter::Util::Resolution.which('sshd') + if Facter::Core::Execution.which('sshd') # sshd doesn't actually have a -V option (hopefully one will be added), # by happy coincidence the usage information that is printed includes the # version number. - version = Facter::Util::Resolution.exec('sshd -V 2>&1') + version = Facter::Core::Execution.execute('sshd -V 2>&1') .lines .to_a .select { |line| line.match(%r{^OpenSSH_|^Sun_SSH_}) }