【发布时间】:2014-06-18 05:34:22
【问题描述】:
跑步:
knife bootstrap ec2-54-221-16-158.compute-1.amazonaws.com --sudo -x chef -P chef -N server --run-list 'role[inicial]'
我的食谱/default.rb:
script "teste de script" do
interpreter "bash"
cwd "/home/ubuntu"
code <<-EOH
as-create-launch-config LcTiagoN --image-id ami-0521316c --instance-type t1.micro --key tiagov
EOH
end
我的角色/initial.rb:
name "inicial"
run_list "recipe[my_cookbook]"
下面出现如下错误:
ShellOut::ShellCommandFailed←[
0m
------------------------------------←[
0m
Expected process to exit with [0], but
received '127'
---- Begin output of "bash" "/tmp/che
f-script20140501-8463-12uvvvl" ----
STDOUT:
STDERR: /tmp/chef-script20140501-8463-
12uvvvl: line 1: as-create-launch-config: command not found
---- End output of "bash" "/tmp/chef-
script20140501-8463-12uvvvl" ----
但是,当我直接登录亚马逊实例运行相同的命令(as-create-launch-config LcTiagoN --image-id ami-0521316c --instance-type t1.micro --key tiagov)时,命令是成功执行。
有什么建议吗?
【问题讨论】:
标签: amazon-web-services chef-infra knife