diff --git a/apache2/recipes/default.rb b/apache2/recipes/default.rb index 343d8de29..ff3c1cf14 100644 --- a/apache2/recipes/default.rb +++ b/apache2/recipes/default.rb @@ -17,13 +17,11 @@ # limitations under the License. # -include_recipe "iptables" - package "apache2" do case node[:platform] - when "CentOS","RedHat","Fedora","SuSE" + when "centos","redhat","fedora","suse" name "httpd" - when "Debian","Ubuntu" + when "debian","ubuntu" name "apache2" end action :install @@ -31,16 +29,16 @@ service "apache2" do case node[:platform] - when "CentOS","RedHat","Fedora","SuSE" + when "centos","redhat","fedora","suse" name "httpd" - when "Debian","Ubuntu" + when "debian","ubuntu" name "apache2" end supports :restart => true action :enable end -if platform?("CentOS", "RedHat", "Fedora", "SuSE") +if platform?("centos", "redhat", "fedora", "suse") directory node[:apache][:log_dir] do mode 0755 action :create @@ -86,9 +84,9 @@ template "apache2.conf" do case node[:platform] - when "CentOS","RedHat","Fedora" + when "centos","redhat","fedora" path "#{node[:apache][:dir]}/conf/httpd.conf" - when "Debian","Ubuntu" + when "debian","ubuntu" path "#{node[:apache][:dir]}/apache2.conf" end source "apache2.conf.erb" @@ -105,13 +103,6 @@ mode 0644 end -node[:apache][:listen_ports].each do |port| - iptables_rule "port_#{port}" do - source "port_apache.erb" - variables :port => port - end -end - template "#{node[:apache][:dir]}/sites-available/default" do source "default-site.erb" owner "root" @@ -134,7 +125,7 @@ include_recipe "apache2::mod_mime" include_recipe "apache2::mod_negotiation" include_recipe "apache2::mod_setenvif" -include_recipe "apache2::mod_log_config" if platform?("CentOS", "RedHat", "SuSE") +include_recipe "apache2::mod_log_config" if platform?("centos", "redhat", "suse") service "apache2" do action :start diff --git a/apache2/recipes/mod_fcgid.rb b/apache2/recipes/mod_fcgid.rb index 6adefe831..05ba07f15 100644 --- a/apache2/recipes/mod_fcgid.rb +++ b/apache2/recipes/mod_fcgid.rb @@ -17,9 +17,9 @@ # limitations under the License. # -if platform?("Debian", "Ubuntu") +if platform?("debian", "ubuntu") package "libapache2-mod-fcgid" -elsif platform?("CentOS", "RedHat", "SuSE") +elsif platform?("centos", "redhat", "suse") apache_lib_path = node[:architecture] == "i386" ? "/usr/lib/httpd" : "/usr/lib64/httpd" package "httpd-devel" bash "install-fcgid" do diff --git a/build-essential/recipes/default.rb b/build-essential/recipes/default.rb index 3e6dc44bf..8c4de9589 100644 --- a/build-essential/recipes/default.rb +++ b/build-essential/recipes/default.rb @@ -18,13 +18,13 @@ # case node[:platform] -when "Ubuntu","Debian" +when "ubuntu","debian" %w{build-essential binutils-doc}.each do |pkg| package pkg do action :install end end -when "CentOS" +when "centos" package "gcc" do action :install end diff --git a/chef/recipes/server.rb b/chef/recipes/server.rb index 111fba24c..b07f20c3d 100644 --- a/chef/recipes/server.rb +++ b/chef/recipes/server.rb @@ -34,7 +34,3 @@ runit_service "chef-indexer" runit_service "chef-server" - -["couchdb", "chef"].each do |port| - iptables_rule "port_#{port}" -end \ No newline at end of file diff --git a/munin/recipes/default.rb b/munin/recipes/default.rb index b3b2133fa..5054ca4d8 100644 --- a/munin/recipes/default.rb +++ b/munin/recipes/default.rb @@ -17,8 +17,6 @@ # limitations under the License. # -include_recipe "iptables" - package "munin-node" service "munin-node" do @@ -37,5 +35,3 @@ variables :munin_server_regexs => munin_server_regexs notifies :restart, resources(:service => "munin-node") end - -iptables_rule "port_munin" \ No newline at end of file diff --git a/mysql/recipes/client.rb b/mysql/recipes/client.rb index 120380928..7730fe344 100644 --- a/mysql/recipes/client.rb +++ b/mysql/recipes/client.rb @@ -19,7 +19,7 @@ package "mysql-devel" do package_name value_for_platform( - [ "CentOS", "RedHat", "SuSE" ] => { "default" => "mysql-devel" }, + [ "centos", "redhat", "suse" ] => { "default" => "mysql-devel" }, "default" => 'libmysqlclient15-dev' ) action :install @@ -27,7 +27,7 @@ package "mysql-client" do package_name value_for_platform( - [ "CentOS", "RedHat", "SuSE" ] => { "default" => "mysql" }, + [ "centos", "redhat", "suse" ] => { "default" => "mysql" }, "default" => "mysql-client" ) action :install diff --git a/mysql/recipes/server.rb b/mysql/recipes/server.rb index 9352667ea..e5f605bd2 100644 --- a/mysql/recipes/server.rb +++ b/mysql/recipes/server.rb @@ -16,7 +16,6 @@ # See the License for the specific language governing permissions and # limitations under the License. # -include_recipe "iptables" include_recipe "mysql::client" @@ -29,14 +28,12 @@ action :enable end -iptables_rule "port_mysql" - if (node[:ec2] && ! FileTest.directory?(node[:mysql_ec2_path])) mysql_server_path = "" case node[:platform] - when "Ubuntu","Debian" + when "ubuntu","debian" mysql_server_path = "/var/lib/mysql" else mysql_server_path = "/var/mysql" diff --git a/openssh/recipes/default.rb b/openssh/recipes/default.rb index 2d6f95992..56f5d64b9 100644 --- a/openssh/recipes/default.rb +++ b/openssh/recipes/default.rb @@ -17,10 +17,8 @@ # limitations under the License. # -include_recipe "iptables" - packages = case node[:platform] - when "CentOS","RedHat","Fedora" + when "centos","redhat","fedora" %w{openssh-clients openssh} else %w{openssh-client openssh-server} @@ -32,7 +30,7 @@ service "ssh" do case node[:platform] - when "CentOS","RedHat","Fedora" + when "centos","redhat","fedora" service_name "sshd" else service_name "ssh" @@ -41,5 +39,3 @@ action [ :enable, :start ] end -iptables_rule "port_ssh" - diff --git a/redmine/recipes/default.rb b/redmine/recipes/default.rb index e6860deca..5914ff6db 100644 --- a/redmine/recipes/default.rb +++ b/redmine/recipes/default.rb @@ -18,10 +18,7 @@ # limitations under the License. # # Get prerequisite recipes. -include_recipe "iptables" include_recipe "subversion" include_recipe "mysql::server" runit_service "redmine" - -iptables_rule "port_redmine" \ No newline at end of file diff --git a/subversion/recipes/default.rb b/subversion/recipes/default.rb index a41d929c9..00cfd92c4 100644 --- a/subversion/recipes/default.rb +++ b/subversion/recipes/default.rb @@ -22,13 +22,13 @@ end extra_packages = case node[:platform] - when "Ubuntu","Debian" + when "ubuntu","debian" if node[:platform_version].to_f < 8.04 %w{subversion-tools libsvn-core-perl} else %w{subversion-tools libsvn-perl} end - when "CentOS","RedHat","Fedora" + when "centos","redhat","fedora" %w{subversion-devel subversion-perl} end diff --git a/teamspeak/recipes/default.rb b/teamspeak/recipes/default.rb index d117fc44a..0a1a76eca 100644 --- a/teamspeak/recipes/default.rb +++ b/teamspeak/recipes/default.rb @@ -15,11 +15,8 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -include_recipe "iptables" package "teamspeak-server" service "teamspeak-server" do action :enable -end - -iptables_rule "port_teamspeak" \ No newline at end of file +end \ No newline at end of file