Skip to content

Instantly share code, notes, and snippets.

@scarolan
Created February 20, 2015 21:57
Show Gist options
  • Save scarolan/180fabedabab763ff299 to your computer and use it in GitHub Desktop.
Save scarolan/180fabedabab763ff299 to your computer and use it in GitHub Desktop.
package "emacs" do
action :install
end
package "emacs" do
action :remove
end
# example for installing multiple packages
#%w(emacs telnet httpd vim-enhanced).each do |p|
# You will want to store the package list in the default attributes file
# This line goes in attributes/default.rb
# default['base']['packages'] = %w(emacs telnet httpd vim-enhanced)
# then you can simply access it from the node object
node['base']['mypackages'].each do |p|
package p do
action :install
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment