Create a gist now

Instantly share code, notes, and snippets.

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
# 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 [
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment