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
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
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, :remove ]
end
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
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
{
"name": "LOCAL",
"default_attributes": {},
"override_attributes": {},
"json_class": "Chef::Environment",
"description": "Testing environment for locally hosted vms",
"cookbook_versions": {},
"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
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",
# 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",