We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 300e350 + d8fb0c2 commit 7b52cbeCopy full SHA for 7b52cbe
tasks/puppet_runonce.sh
@@ -24,4 +24,15 @@ echo
24
--no-usecacheonfailure \
25
--no-splay \
26
--no-use_cached_catalog \
27
+ --detailed-exitcodes \
28
$NOOP_FLAG
29
+
30
+# Without --detailed-exitcodes, the `puppet agent` command will return 0 even
31
+# if there are resource failures. Use --detailed-exitcodes but only exit
32
+# non-zero if an error occurred. Changes (code 2) are not errors.
33
+exitcode=$?
34
+if [ $exitcode -eq 0 -o $exitcode -eq 2 ]; then
35
+ exit 0
36
+else
37
+ exit $exitcode
38
+fi
0 commit comments