Skip to content

Instantly share code, notes, and snippets.

View lithix-src's full-sized avatar

Erik blas lithix-src

  • Seattle, WA
View GitHub Profile
[Thu, 15 Nov 2012 15:36:47 -0800] ERROR: Sandbox finalization: got exception moving files, undoing previous changes: Invalid cross-device link - /mnt/cache/chef/sandboxes/bb65c5a6978d499abdac2deb706913dc/3237ac3455c37577a0913bef7a0664ac or /var/lib/chef/cookbook_index/32/3237ac3455c37577a0913bef7a0664ac -- /usr/lib/ruby/vendor_ruby/chef/checksum/storage/filesystem.rb:38:in `rename'
# debian packages
%w{gcc libxslt-dev libxml2-dev}.each do |pkg|
package pkg do
action :install
end
end
# gems
gem_hash = {
"nokogiri" => "1.5.5",
knife environment show LOCAL -Fj
knife environment show LOCAL -Fj
{
"name": "LOCAL",
"description": "Testing environment for locally hosted vms",
"cookbook_versions": {
"dbshards": "= 0.0.13"
},
"json_class": "Chef::Environment",
"chef_type": "environment",
knife node show DBS28N1TEST
knife node show DBS28N1TEST
Node Name: DBS28N1TEST
Environment: LOCAL
FQDN: ip-10-60-101-24.ec2.internal
IP: 184.73.6.235
Run List: role[base], role[dbshards_node]
Roles: dbshards_node, base
Recipes: chef-client, users, users::developers, sudo, dbshards
Platform: ubuntu 11.04
{
"name": "LOCAL",
"default_attributes": {},
"override_attributes": {},
"json_class": "Chef::Environment",
"description": "Testing environment for locally hosted vms",
"cookbook_versions": {},
"chef_type": "environment"
}
chef > require 'psych'
LoadError: no such file to load -- psych
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
from (irb):6
from :0
def initialize(*args)
super
@action = :create
end
action :remove do
search("#{new_resource.data_bag}", "groups:#{new_resource.search_group} AND action:remove") do |rm_user|
user rm_user['id'] do
action :remove
end
users_manage "developers" do
group_name "developers"
group_id 2001
action [ :create, :remove ]
end
action :remove do
search("#{new_resource.data_bag}", "groups:#{new_resource.search_group} AND action:remove") do |rm_user|
user rm_user['id'] do
action :remove
end
end
end
users_manage "developers" do
group_name "developers"
group_id 2001
action [ :create, :remove3 ]
end