From 5fb1060a37c770052922764a9f603c779bf27f22 Mon Sep 17 00:00:00 2001 From: Brent Smith Date: Tue, 3 May 2016 17:56:46 -0700 Subject: [PATCH] [postfix] add correct sudo commands The exact command is needed, the previous one was not working. --- recipes/postfix.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/recipes/postfix.rb b/recipes/postfix.rb index 426611a8..22dc0227 100644 --- a/recipes/postfix.rb +++ b/recipes/postfix.rb @@ -21,19 +21,22 @@ # 'tags' => ['test'] # } # ] +# include_recipe 'datadog::dd-agent' include_recipe 'sudo' # ~FC007 uses `suggests` postfix_instances = Array(node['datadog']['postfix']['instances']) postfix_commands = postfix_instances.map do |instance| - "/usr/bin/find #{instance['directory']}" + instance['queues'].map do |queue| + "/usr/bin/find #{instance['directory']}/#{queue} -type f" + end end sudo 'dd-agent-find-postfix' do user 'dd-agent' nopasswd true - commands postfix_commands.uniq + commands postfix_commands.flatten.uniq only_if { postfix_instances.any? } end