文件操作 - plain.rb
返回文件管理
返回主菜单
删除本文件
文件: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/node/plain.rb
编辑文件内容
# frozen_string_literal: true require_relative '../../../puppet/node' require_relative '../../../puppet/indirector/plain' class Puppet::Node::Plain < Puppet::Indirector::Plain desc "Always return an empty node object. Assumes you keep track of nodes in flat file manifests. You should use it when you don't have some other, functional source you want to use, as the compiler will not work without a valid node terminus. Note that class is responsible for merging the node's facts into the node instance before it is returned." # Just return an empty node. def find(request) node = super node.environment = request.environment facts = request.options[:facts].is_a?(Puppet::Node::Facts) ? request.options[:facts] : nil node.fact_merge(facts) node end end
修改文件时间
将文件时间修改为当前时间的前一年
删除文件