From d738d2cf3498e7162b0cc4be1acbd8ecc8e1a7f8 Mon Sep 17 00:00:00 2001 From: Hector Castro Date: Mon, 29 Jul 2013 11:44:53 -0400 Subject: [PATCH] Provider for RHEL and Fedora had to be altered to RPM. Also, adjusted platform conditionals so that they use platform_family instead. --- recipes/enterprise_package.rb | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/recipes/enterprise_package.rb b/recipes/enterprise_package.rb index dd23b43..8e6ddb8 100644 --- a/recipes/enterprise_package.rb +++ b/recipes/enterprise_package.rb @@ -72,11 +72,9 @@ package package_name do source "#{Chef::Config[:file_cache_path]}/#{package_file}" action :install - case node['platform'] when "ubuntu","debian" - options "--force-confdef --force-confold" - end - provider value_for_platform( - [ "ubuntu", "debian" ] => {"default" => Chef::Provider::Package::Dpkg}, - [ "redhat", "centos", "fedora" ] => {"default" => Chef::Provider::Package::Yum} + options "--force-confdef --force-confold" if node['platform_family'] == "debian" + provider value_for_platform_family( + [ "debian" ] => Chef::Provider::Package::Dpkg, + [ "rhel", "fedora" ] => Chef::Provider::Package::Rpm ) end