From b204ea814b47ef2caed4322fa609f38e8df6dad6 Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Wed, 26 Aug 2020 12:03:49 -0700 Subject: [PATCH] Only use multi-package on *nix Signed-off-by: Tim Smith --- recipes/_common.rb | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/recipes/_common.rb b/recipes/_common.rb index 069495b..6b0bf94 100644 --- a/recipes/_common.rb +++ b/recipes/_common.rb @@ -2,7 +2,7 @@ # Cookbook:: common # Recipe:: default # -# Copyright:: 2009-2019, Chef Software, Inc. +# Copyright:: 2009-2020, Chef Software, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -19,7 +19,14 @@ include_recipe 'postfix::_attributes' -package node['postfix']['packages'] +# use multi-package when we can +if node['os'] == 'linux' + package node['postfix']['packages'] +else + node['postfix']['packages'].each do |pkg| + package pkg + end +end package 'procmail' if node['postfix']['use_procmail']