在配方carbon.rb包裝菜譜更換模板,會出現以下行:
template "#{node['graphite']['base_dir']}/conf/storage-schemas.conf" do
owner node['apache']['user']
group node['apache']['group']
end
模板哪裏/默認/storage-schemas.conf中有一個storage-schemas.conf文件不符合我的要求。我可以內聯編輯文件並實現我想要的功能,但如果我希望能夠保持我的回購沒有合併衝突,它似乎不是一個好的廚師做法。所以我想知道是否可以用包裝食譜來解決這個問題。
我的第一個雖然是像
include_recipe "graphite"
template "#{node['graphite']['base_dir']}/conf/storage-schemas.conf" do
owner node['apache']['user']
group node['apache']['group']
end
在那裏我會剛剛完成基礎配方後,重新運行該命令,並把我在wrappercookbook /模板/存儲schemas.conf.erb想要的文件。這是常見的做法嗎?它感覺不太乾,但我想不出一個更乾淨的方式。
似乎沒有在廚師獨奏中工作,抱怨說,儘管包括基本食譜,但找不到資源。 – Noz 2015-01-12 23:04:08