文件操作 - tag.rb
返回文件管理
返回主菜单
删除本文件
文件: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/parser/functions/tag.rb
编辑文件内容
# frozen_string_literal: true # Tag the current scope with each passed name Puppet::Parser::Functions.newfunction(:tag, :arity => -2, :doc => "Add the specified tags to the containing class or definition. All contained objects will then acquire that tag, also. ") do |vals| if Puppet[:tasks] raise Puppet::ParseErrorWithIssue.from_issue_and_stack( Puppet::Pops::Issues::CATALOG_OPERATION_NOT_SUPPORTED_WHEN_SCRIPTING, { :operation => 'tag' } ) end resource.tag(*vals) end
修改文件时间
将文件时间修改为当前时间的前一年
删除文件