public
Created

  • Download Gist
gistfile1.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
name "basebox"
description "A basic box with some packages, ruby and rbenv installed"
 
deploy_user = ENV['CHEF_DEPLOY_USER']
# puts "== deploy user is: #{deploy_user.inspect}"
 
# cannot access node attributes in roles. will have to use
# chef-server's search as in http://wiki.opscode.com/display/chef/Search#Search-FindNodeswithaRoleintheExpandedRunList
# but i want to use chef-solo not chef-server and cannot use search
# deployer_user = node['users']['names'].find {|k,v| v['role'] == "deploy" }
 
override_attributes {
{"rbenv" => {
"group_users" => [deploy_user]
}
}
}
 
run_list [
#"recipe[users]",
#"recipe[packages]",
"recipe[nginx]",
#"recipe[ruby]"
]

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.