[chef] apt repository cookbook


Chronological Thread 
  • From: Douglas Garstang < >
  • To:
  • Subject: [chef] apt repository cookbook
  • Date: Thu, 19 Feb 2015 11:32:52 -0800

I'm trying to set up an apt repository with chef. Trying to use a community cookbook, I found this one: https://github.com/hw-cookbooks/repository

It's readme says to drop new deb files into the /srv/repository_incoming directory and then run the chef-client. Doing that gets me this error:

==> default: NoMethodError
==> default: -------------
==> default: undefined method `repository' for Chef::Resource::Repository
==> default:
==> default:
==> default: Cookbook Trace:
==> default: ---------------
==> default: /tmp/vagrant-chef/8c7b6c4971128a90594d5194827546c6/cookbooks/repository/recipes/incoming.rb:36:in `block (3 levels) in from_file'
==> default: /tmp/vagrant-chef/8c7b6c4971128a90594d5194827546c6/cookbooks/repository/recipes/incoming.rb:33:in `each'
==> default: /tmp/vagrant-chef/8c7b6c4971128a90594d5194827546c6/cookbooks/repository/recipes/incoming.rb:33:in `block (2 levels) in from_file'
==> default:
==> default:
==> default:
==> default: Resource Declaration:
==> default: ---------------------
==> default: # In /tmp/vagrant-chef/8c7b6c4971128a90594d5194827546c6/cookbooks/repository/recipes/incoming.rb
==> default:
==> default:  30: ruby_block 'Repository - Process incoming' do
==> default:  31:   action :nothing
==> default:  32:   block do
==> default:  33:     Dir.glob(File.join(node[:repository][:incoming][:directory], '*.deb')).each do |deb_file|
==> default:  34:       r = Chef::Resource::Repository.new(deb_file, run_context)
==> default:  35:       r.action :nothing
==> default:  36:       r.repository node[:repository][:incoming][:name]
==> default:  37:       r.run_action(:add)
==> default:  38:     end
==> default:  39:   end
==> default:  40:   only_if do
==> default:  41:     File.directory?(node[:repository][:incoming][:directory])
==> default:  42:   end
==> default:  43: end


I've been digging around and I can't even find the Chef::Resource::Repository resource, so I have no idea what's going on. Any idea? Or, is there a better community cookbook for managing a private apt repository?

Doug




Archive powered by MHonArc 2.6.16.

§