読者です 読者をやめる 読者になる 読者になる

by shigemk2

当面は技術的なことしか書かない

FATAL: Chef::Exceptions::ChildConvergeError

Chef

こんなかんじのレシピを書いていたんだけど、

#
# Cookbook Name:: hello
# Recipe:: default
#
# Copyright 2013, YOUR_COMPANY_NAME
#
# All rights reserved - Do Not Redistribute
#
log "hello, world!"

package "zsh" do
  action :install
end

Starting Chef Client, version 11.6.0
Compiling Cookbooks...
Converging 2 resources
Recipe: hello::default
* log[hello, world!] action write

* package[zsh] action install
================================================================================
Error executing action `install` on resource 'package[zsh]'
================================================================================


Errno::ENOENT

                        • -

No such file or directory - port installed zsh


Resource Declaration:

                                        • -

# In /Users/shige/projects/chef-repo/cookbooks/hello/recipes/default.rb

11: package "zsh" do
12: action :install
13: end



Compiled Resource:

                                  • -

# Declared in /Users/shige/projects/chef-repo/cookbooks/hello/recipes/default.rb:11:in `from_file'

package("zsh") do
package_name "zsh"
action [:install]
recipe_name "default"
cookbook_name :hello
retry_delay 2
retries 0
end



[2013-07-28T11:22:43+09:00] ERROR: Running exception handlers
[2013-07-28T11:22:43+09:00] ERROR: Exception handlers complete
[2013-07-28T11:22:43+09:00] FATAL: Stacktrace dumped to /tmp/chef-solo/chef-stacktrace.out
Chef Client failed. 1 resources updated
[2013-07-28T11:22:43+09:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

というエラーが出てしまった。
Chef-soloでMacのパッケージをインストールする際に、MacPortsではなくhomebrewを使いたい | ユニキャストラボ

installするときはhomebrewではなくmacportsを使っているということなのか。

chef-repo/cookbooks% git clone https://github.com/opscode-cookbooks/homebrew.git
// localhost.json
{
    "run_list" : [
        "recipe[hello]",
        "recipe[homebrew]"
    ]
}