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