Created
December 6, 2012 07:07
-
-
Save deepak/4222393 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]" | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment