Skip to content

Instantly share code, notes, and snippets.

@adamhjk
Created March 3, 2010 21:34
Show Gist options
  • Save adamhjk/321060 to your computer and use it in GitHub Desktop.
Save adamhjk/321060 to your computer and use it in GitHub Desktop.
# role
name 'base-packages'
default_attributes :packages => {
'build-essential' => "latest",
'gcc' => "3.0"
}
run_list "recipe[install-packages]"
# cookbooks/install-packages/recipe/default.rb
node.packages.each do |name, version_number|
package name do
version vesion_number if version_number != "latest"
action :install
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment