Skip to content

Instantly share code, notes, and snippets.

@logikal
Last active December 17, 2015 02:29
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save logikal/5535751 to your computer and use it in GitHub Desktop.
Save logikal/5535751 to your computer and use it in GitHub Desktop.
How to change default attributes
# With Vagrantfile's chef.json:
chef.json = {
"postgresql" => {
"version" => "9.2"
}
}
# Calling a premade databag item, from a recipe
# ! This probably will require modifications
# ! to the recipe, or a wrapper cookbook
node['postgresql']['version'] = data_bag_item('postgresql', 'version')
# In an environment file
node.default['postgresql']['version'] = "9.2"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment