1

我正在使用厨师的内置模板资源,它看起来像模板的 updated_by_last_action?未实施。现在这似乎是不可能的,因为模板是一个相当基本的资源。那么我错过了什么?

为什么我认为模板 updated_by_last_action 的证据?被打破

(1)

t = template "some file" do
  source "someerbfile.erb"
  action :create
end
Chef::Log.info("-------updated_by_last_action? : #{t.updated_by_last_action?}"

运行时总是给出 false - 文件是否已更新。

(2) 查看模板的实现和它的超类文件https://github.com/opscode/chef/blob/master/lib/chef/provider/file.rbhttps://github.com/opscode /chef/blob/master/lib/chef/provider/template.rb,我没有看到任何将 updated_by_last_action 的值设置为 true 或更新为 true 的代码。

4

1 回答 1

3
于 2013-02-15T09:01:56.900 回答