【发布时间】:2023-06-28 19:51:01
【问题描述】:
在尝试将我的食谱上传到服务器时,我收到以下错误声明。
"正在上传 first_cb [0.1.0]
ERROR: ArgumentError: too short control escape"
命令是:
$刀菜谱上传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
刀.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"]
提前谢谢...!!!
【问题讨论】:
-
也许你的路径或knife.rb中有一个未转义的字符? *.com/questions/36111835/…
-
对不起,我不明白..我对 Chef 很陌生..你能告诉我未转义字符是什么意思吗?
-
你能把你的knife.rb贴在这里吗?您使用的是 Windows 吗?
-
是的,我使用 Windows 机器作为工作站,使用 ubuntu 作为节点。这是刀.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"]
标签: ruby chef-infra chef-recipe cookbook