File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 5
5
# Wait for up to five minutes for an in-progress Puppet agent run to complete
6
6
# TODO: right now the check is just for lock file existence. Improve the check
7
7
# to account for situations where the lockfile is stale.
8
- echo -n " Check for and wait up to 5 minutes for in-progress run to complete: "
8
+ echo -n " Check for and wait up to 5 minutes for in-progress run to complete"
9
9
lockfile=$( /opt/puppetlabs/bin/puppet config print agent_catalog_run_lockfile)
10
10
n=0
11
11
until [ $n -ge 300 ]
17
17
done
18
18
echo
19
19
20
+ # Notes:
21
+ # - Do not run with color, as the color codes can make interpreting output when
22
+ # passed through Bolt difficult.
23
+ # - Without --detailed-exitcodes, the `puppet agent` command will return 0 even
24
+ # if there are a resource failures. So, use --detailed-exitcodes.
20
25
/opt/puppetlabs/bin/puppet agent \
21
26
--onetime \
22
27
--verbose \
25
30
--no-splay \
26
31
--no-use_cached_catalog \
27
32
--detailed-exitcodes \
33
+ --color false \
28
34
$NOOP_FLAG
29
35
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.
36
+ # Only exit non-zero if an error occurred. Changes (detailed exit code 2) are
37
+ # not errors.
33
38
exitcode=$?
34
39
if [ $exitcode -eq 0 -o $exitcode -eq 2 ]; then
35
40
exit 0
You can’t perform that action at this time.
0 commit comments