Chef Cookbook上传错误

时间:2017-03-11 10:50:39

标签: ruby chef chef-recipe cookbook



在尝试将我的食谱上传到服务器时,我收到以下错误声明。

    “上传first_cb [0.1.0]
    错误:ArgumentError:控制转义太短“

命令是:
    $ knife cookbook上传first_cb

default.rb包含以下代码:

package "httpd" do
    action :install
end

service "httpd" do
    action [:enable, :start]
end

template "/var/www/html/index.html" do
    source "index.html"
    mode "0644"
end

knife.rb

current_dir = File.dirname(__FILE__) 
log_level :info 
log_location STDOUT 
node_name "ktgirish" 
client_key "#{current_dir}/ktgirish.pem" 
chef_server_url "https://api.chef.io/organizations/girish123" 
cookbook_path ["#{current_dir}/../cookbooks"]

提前致谢... !!!

1 个答案:

答案 0 :(得分:0)

我认为您需要传递源'index.html.erb'而不是index.html。 您需要在模板文件夹中创建和index.html.erb文件。

相关问题