Sha256: b15b19364f6a1fb5d16f26f82a3b5c16eb6555edbdd88a28af6cfec3d36d0f7e

Contents?: true

Size: 622 Bytes

Versions: 2

Compression:

Stored size: 622 Bytes

Contents

# frozen_string_literal: true

module Facter
  module El
    class Ssh
      FACT_NAME = 'ssh'

      def call_the_resolver
        result = Resolvers::SshResolver.resolve(:ssh)
        ssh_facts = {}
        result.each { |ssh| ssh_facts.merge!(create_ssh_fact(ssh)) }
        ResolvedFact.new(FACT_NAME, ssh_facts)
      end

      private

      def create_ssh_fact(ssh)
        { ssh.name.to_sym =>
              { fingerprints: { sha1: ssh.fingerprint.sha1,
                                sha256: ssh.fingerprint.sha256 },
                key: ssh.key,
                type: ssh.type } }
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
facter-4.0.8.pre lib/facts/el/ssh.rb
facter-4.0.7.pre lib/facts/el/ssh.rb