文件操作 - scope6_interfaces.rb
返回文件管理
返回主菜单
删除本文件
文件: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter/facts/windows/scope6_interfaces.rb
编辑文件内容
# frozen_string_literal: true module Facts module Windows class Scope6Interfaces FACT_NAME = 'scope6_.*' TYPE = :legacy def call_the_resolver arr = [] result = {} interfaces = Facter::Resolvers::Windows::Networking.resolve(:interfaces) interfaces&.each { |interface_name, info| result["scope6_#{interface_name}"] = info[:scope6] if info[:scope6] } result.each { |fact, value| arr << Facter::ResolvedFact.new(fact, value, :legacy) } arr end end end end
修改文件时间
将文件时间修改为当前时间的前一年
删除文件