Permalink
Browse files

Switch from platform to platform family.

  • Loading branch information...
1 parent 6c58aff commit 6704de711f7d7772b11358da06736c44cc9b7a16 @tas50 tas50 committed with Oct 20, 2012
Showing with 15 additions and 21 deletions.
  1. +15 −21 recipes/rubygems-install.rb
@@ -33,31 +33,25 @@
home node['chef_server']['path']
end
-case node['platform']
-when "ubuntu"
-
- if node['platform_version'].to_f >= 9.10
- include_recipe "couchdb"
- elsif node['platform_version'].to_f >= 8.10
+case node['platform_family']
+when "debian"
+ if node['platform'] == "ubuntu" AND node['platform_version'].to_f >= 9.10
+ include_recipe "couchdb"
+ elsif node['platform'] == "ubuntu" AND node['platform_version'].to_f >= 8.10
include_recipe "couchdb::source"
end
- include_recipe "java"
- include_recipe "chef-server::rabbitmq"
- include_recipe "gecode"
-
-when "debian"
- if node['platform_version'].to_f >= 6.0 || node['platform_version'] =~ /.*sid/
+ if node['platform'] == "debian" AND node['platform_version'].to_f >= 6.0 || node['platform'] == "debian" AND node['platform_version'] =~ /.*sid/
include_recipe "couchdb"
- else
+ elsif node['platform'] == "debian"
include_recipe "couchdb::source"
end
include_recipe "java"
include_recipe "chef-server::rabbitmq"
include_recipe "gecode"
-when "centos","redhat","fedora","amazon","scientific"
+when "rhel", "fedora"
include_recipe "couchdb"
include_recipe "java"
@@ -191,14 +185,14 @@
recursive true
end
- dist_dir = value_for_platform(
- ["ubuntu", "debian"] => { "default" => "debian" },
- ["redhat", "centos", "fedora", "amazon", "scientific"] => { "default" => "redhat"}
+ dist_dir = value_for_platform_family(
+ ["debian"] => { "default" => "debian" },
+ ["rhel", "fedora"] => { "default" => "redhat"}
)
- conf_dir = value_for_platform(
- ["ubuntu", "debian"] => { "default" => "default" },
- ["redhat", "centos", "fedora", "amazon", "scientific"] => { "default" => "sysconfig"}
+ conf_dir = value_for_platform_family(
+ ["debian"] => { "default" => "default" },
+ ["rhel", "fedora"] => { "default" => "sysconfig"}
)
chef_version = node['chef_packages']['chef']['version']
@@ -269,4 +263,4 @@
log("Could not determine service init style, manual intervention required to set up server services.")
-end
+end

0 comments on commit 6704de7

Please sign in to comment.