diff --git a/recipes/default.rb b/recipes/default.rb index 73f5df1..c93166d 100644 --- a/recipes/default.rb +++ b/recipes/default.rb @@ -22,9 +22,18 @@ # Install MongoDB package install_package = %w(mongodb-org-server mongodb-org-shell mongodb-org-tools) +case node['platform_family'] + when 'debian' + # bypass dpkg errors about pre-existing init or conf file + packager_opts = '-o Dpkg::Options::="--force-confold" --force-yes' + else + packager_opts = '' +end + install_package.each do |pkg| package pkg do version node['mongodb3']['package']['version'] + options packager_opts action :install end end