Skip to content

Commit

Permalink
NOTE: networking_basic on community.opscode.com, still refers to READ…
Browse files Browse the repository at this point in the history
…ME.rdoc, causing problems for folks trying to upload to chef-server/opscode platform

Fixed: invalid platform attribute "rhel".  Added redhat, centos, scientific, amazon
  • Loading branch information
Eric G. Wolfe committed May 3, 2012
1 parent 7706628 commit 6bf868b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 57 deletions.
47 changes: 6 additions & 41 deletions networking_basic/attributes/default.rb
Original file line number Diff line number Diff line change
@@ -1,41 +1,6 @@
default[:debian][:install_list] = [
'lsof',
'iptables',
'jwhois',
'whois',
'curl',
'wget',
'rsync',
'jnettop',
'nmap',
'traceroute',
'ethtool',
'iproute',
'iputils-ping',
'netcat-openbsd',
'tcptraceroute',
'tcputils',
'tcpdump',
'elinks',
'lynx'
]

default[:redhat][:install_list] = [
'lsof',
'iptables',
'jwhois',
'curl',
'wget',
'rsync',
'nmap',
'traceroute',
'ethtool',
'iproute',
'iputils',
'nc',
'tcptraceroute',
'tcputils',
'tcpdump',
'elinks',
'lynx'
]
case node['platform']
when "debian","ubuntu"
default['networking']['packages'] = %w[ lsof iptables jwhois whois curl wget rsync jnettop nmap traceroute ethtool iproute iputils-ping netcat-openbsd tcptraceroute tcputils tcpdump elinks lynx ]
when "redhat","centos","scientific","amazon"
default['networking']['packages'] = %w[ lsof iptables jwhois curl wget rsync nmap traceroute ethtool iproute iputils nc tcptraceroute tcputils tcpdump elinks lynx ]
end
2 changes: 1 addition & 1 deletion networking_basic/metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
license "Apache 2.0"
description "Install Basic Networking Tools and Utilities on Debian, Centos RedHat and Ubuntu"
long_description IO.read(File.join(File.dirname(__FILE__), 'README.textile'))
version "0.0.3"
version "0.0.4"

%w{ ubuntu debian centos redhat }.each do |os|
supports os
Expand Down
17 changes: 2 additions & 15 deletions networking_basic/recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,6 @@
#
#

case node[:platform]
when "debian", "ubuntu"
node[:debian][:install_list].each do |pkg|
package pkg do
action :install
ignore_failure true
end
end
when "rhel", "centos"
node[:redhat][:install_list].each do |pkg|
package pkg do
action :install
ignore_failure true
end
end
node['networking']['packages'].each do |netpkg|
package netpkg
end

2 comments on commit 6bf868b

@fred
Copy link

@fred fred commented on 6bf868b May 4, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sweet, thank you.

@atomic-penguin
Copy link
Owner

@atomic-penguin atomic-penguin commented on 6bf868b May 4, 2012 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.