Skip to content

Instantly share code, notes, and snippets.

@Sauraus
Created July 31, 2013 23:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Sauraus/6127168 to your computer and use it in GitHub Desktop.
Save Sauraus/6127168 to your computer and use it in GitHub Desktop.
How to add version attribute here?
pkgs.flatten.each do |pkg|
r = package pkg do
action( node['build_essential']['compiletime'] ? :nothing : :install )
end
r.run_action(:install) if node['build_essential']['compiletime']
end
@trilitheus
Copy link

Maybe something similar to this?

pkgs = {'kernel-devel' => '2.6....', 'otherpkg' => '1.1.1.1'}

pkgs.each do |p, v|

r = package p do
action :nothing
version v
end

r.run_action(:install) if node['build_essential']['compiletime']

end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment