From 67d6b4d29c692a982696f44e50ef40c08cc266e6 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Fri, 1 Nov 2024 17:11:39 +0100 Subject: [PATCH] puppet_runonce: redirect stderr to stdout In case the Puppet Agent fails, it prints an error to stderr. Previously when running the task, and the agent failed, it would output only normal stdout, which contained only successful changes, and actual errors were hidden. --- tasks/puppet_runonce.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/puppet_runonce.sh b/tasks/puppet_runonce.sh index 1e72c86a..c2cc5960 100755 --- a/tasks/puppet_runonce.sh +++ b/tasks/puppet_runonce.sh @@ -39,7 +39,7 @@ echo --detailed-exitcodes \ --color false \ $ENV_FLAG \ - $NOOP_FLAG + $NOOP_FLAG 2>&1 # Only exit non-zero if an error occurred. Changes (detailed exit code 2) are # not errors.