Skip to content

Commit

Permalink
use multipackage syntax to install packages
Browse files Browse the repository at this point in the history
chef/chef#3570 almost working now.
  • Loading branch information
furlongm committed Feb 17, 2016
1 parent 688e66a commit ccb5c29
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 12 deletions.
19 changes: 15 additions & 4 deletions chef/cookbooks/misc/recipes/default.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
%w{htop tree git strace mlocate diffstat bash-completion pwgen lsof multitail}.each do |pkg|
package pkg do
action :install
end
misc_packages = [
'htop',
'tree',
'git',
'strace',
'mlocate',
'diffstat',
'bash-completion',
'pwgen',
'lsof',
'multitail',
]

package misc_packages do
action :install
end

case node['platform_family']
Expand Down
18 changes: 14 additions & 4 deletions chef/cookbooks/net/recipes/default.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
%w{ethtool tcpdump nmap telnet iftop whois wget iperf ipset}.each do |pkg|
package pkg do
action :install
end
net_packages = [
'ethtool',
'tcpdump',
'nmap',
'telnet',
'iftop',
'whois',
'wget',
'iperf',
'ipset',
]

package net_packages do
action :install
end

package 'bind-utils' do
Expand Down
5 changes: 1 addition & 4 deletions chef/cookbooks/vim/recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@
action :create
end
when 'suse'
package 'vim' do
action :install
end
package 'vim-data' do
package ['vim', 'vim-data'] do
action :install
end
cookbook_file 'vimrc.Suse' do
Expand Down

0 comments on commit ccb5c29

Please sign in to comment.