2
我正在使用chef-solo並使用berkshelf維護社區食譜。安裝了iptables最近使用berkshelf的cookbook,一旦我跑廚師獨奏,它會拋出以下錯誤。使用Berkshelf時無法找到食譜模板
RuntimeError
------------
File templates/default/rebuild-iptables.erb does not exist for cookbook iptables
Resource Declaration:
---------------------
# In /home/directfn/.berkshelf/cookbooks/iptables-2.0.1/recipes/default.rb
35: template '/usr/sbin/rebuild-iptables' do
36: source 'rebuild-iptables.erb'
37: mode '0755'
38: variables(
39: hashbang: ::File.exist?('/usr/bin/ruby') ? '/usr/bin/ruby' : '/opt/chef/embedded/bin/ruby'
40: )
41: end
42:
但我可以看到模板源在那裏。
[[email protected] chef-repo]# ls /home/directfn/.berkshelf/cookbooks/iptables-2.0.1/templates/default/rebuild-iptables.erb
/home/directfn/.berkshelf/cookbooks/iptables-2.0.1/templates/default/rebuild-iptables.erb
但是,如果我複製iptables的菜譜的地方,我有我的食譜其餘都是,它就像一個魅力。 我正在使用超過30個其他社區食譜使用berkshelf沒有任何問題。
有沒有人知道這裏發生了什麼?
在此先感謝
solo.rb文件
file_cache_path "/home/directfn/devops/chef-solo"
cookbook_path [
"/home/directfn/devops/chef-repo/cookbooks",
"/home/directfn/.berkshelf/cookbooks"
]
data_bag_path "/home/directfn/devops/chef-repo/data_bags"
environment "development"
environment_path "/home/directfn/devops/chef-repo/environments"
的Json屬性文件:
{
"name": "phoenix_new",
"description": "",
"java": {
"install_flavor": "oracle",
"jdk_version": 7,
"oracle": {
"accept_oracle_download_terms": true
}
},
"phoenix": {
"tag": "dbfs_release_0"
},
"run_list": [
"recipe[phoenix::simple]"
],
"env_run_lists": {
}
}
你究竟如何獨立運行?您不應該正常看到'.berkshelf'文件夾中的原始路徑。 – coderanger
我從chef-repo目錄運行以下命令。 '廚師獨奏-c solo.rb -j phoenix_new.json'。我已經編輯了帶有solo.rb和json屬性文件內容的命令。謝謝。 –