文件操作 - sshfp_algorithm.rb
返回文件管理
返回主菜单
删除本文件
文件: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter/facts/openbsd/sshfp_algorithm.rb
编辑文件内容
# frozen_string_literal: true module Facts module Openbsd class SshfpAlgorithm FACT_NAME = 'sshfp_.*' TYPE = :legacy def call_the_resolver facts = [] result = Facter::Resolvers::Ssh.resolve(:ssh) result.each do |ssh| facts << Facter::ResolvedFact.new("sshfp_#{ssh.name.to_sym}", "#{ssh.fingerprint.sha1}\n#{ssh.fingerprint.sha256}", :legacy) end facts end end end end
修改文件时间
将文件时间修改为当前时间的前一年
删除文件