r = gem_package "redis" do
action :install
end
r.run_action(:install)
r = chef_gem "redis" do
action :install
end
r.run_action(:install)
[2013-10-03T16:11:41+00:00] DEBUG: filtered backtrace of compile error:
[2013-10-03T16:11:41+00:00] DEBUG: filtered backtrace of compile error:
[2013-10-03T16:11:41+00:00] DEBUG: backtrace entry for compile error: '/opt/aws/opsworks/releases/20130926123105_208/site-cookbooks/ilnkmx/providers/add_app.rb:1:in `require''
[2013-10-03T16:11:41+00:00] DEBUG: Line number of compile error: '1'
[2013-10-03T16:11:42+00:00] ERROR: Caught exception while compiling OpsWorks custom run list: LoadError - no such file to load -- redis - /opt/aws/opsworks/releases/20130926123105_208/site-cookbooks/ilnkmx/providers/add_app.rb:1:in `require'
r = chef_gem "redis" do
action :nothing
end
r.run_action(:install)
Gem.clear_paths
action :create do
if @current_resource.exists
Chef::Log.info "#{ @new_resource } already exist - nothing to do."
else
converge_by("Create #{ @new_resource }") do
create_app_key
end
end
end
def create_app_key
redis = ::Redis.new
redis.set "#{@new_resource.app_name}", "#{@new_resource.api_key}"
end