Apache2 install with Chef

Ive been working on getting an install of Apache2 up and running using Chef. Everything has worked so far until I run: chef-solo -c solo.rb -j web.json

The error im running into is:

Starting Chef Client, version 11.6.0

Compiling Cookbooks…
[2013-09-17T14:31:57-04:00] WARN: Cloning resource attributes for service[apache2] from prior resource (CHEF-3694)
[2013-09-17T14:31:57-04:00] WARN: Previous service[apache2]: /home/seth/chef-repo/cookbooks/apache2/recipes/default.rb:24:in `from_file’
[2013-09-17T14:31:57-04:00] WARN: Current service[apache2]: /home/seth/chef-repo/cookbooks/apache2/recipes/default.rb:221:in `from_file’
Converging 74 resources
Recipe: apache2::default
* package[apache2] action install
================================================================================
Error executing action `install` on resource ‘package[apache2]’
================================================================================

Chef::Exceptions::Exec
———————-
returned 1, expected 0

Resource Declaration:
———————
# In /home/seth/chef-repo/cookbooks/apache2/recipes/default.rb

20: package “apache2” do
21: package_name node[‘apache’][‘package’]
22: end
23:

 

Compiled Resource:
——————
# Declared in /home/seth/chef-repo/cookbooks/apache2/recipes/default.rb:20:in `from_file’

package(“apache2”) do
action :install
retries 0
retry_delay 2
package_name “httpd”
version “2.2.15-29.el6.centos”
cookbook_name :apache2
recipe_name “default”
end

 

[2013-09-17T14:32:07-04:00] ERROR: Running exception handlers
[2013-09-17T14:32:07-04:00] ERROR: Exception handlers complete
[2013-09-17T14:32:07-04:00] FATAL: Stacktrace dumped to /home/seth/chef-repo/chef-solo/chef-stacktrace.out
Chef Client failed. 0 resources updated
[2013-09-17T14:32:07-04:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

Im not exactly sure whats going on here but im suspecting based on similar issues that there is a problem with me being on Centos and not using Apt. Still digging into this though since I know this should work even if its on Centos.

Advertisements