Multiple rpm install with yum

How can I install multiple rpms using yum without having to code so much?For instance how can I make this work?

yum_package “[gcc,glibc]” do

    action :install

end

%w(gcc glibc).each do |p|
yum_package p do
action :install
end
end

On 10/24/11 3:13 PM, djo@dave-n-georgi.com wrote:

How can I install multiple rpms using yum without having to code so much?
For instance how can I make this work?

yum_package "[gcc,glibc]" do
action :install
end