File tree 2 files changed +8
-0
lines changed
2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"description" : " Run the Puppet agent one time" ,
3
3
"parameters" : {
4
+ "environment" : {
5
+ "type" : " Optional[String]" ,
6
+ "description" : " If set, run Puppet in specified code environment"
7
+ },
4
8
"noop" : {
5
9
"type" : " Optional[Boolean]" ,
6
10
"description" : " If true, run Puppet in no-op mode"
Original file line number Diff line number Diff line change 6
6
# Parse noop parameter
7
7
[ " $PT_noop " = " true" ] && NOOP_FLAG=" --noop" || unset NOOP_FLAG
8
8
9
+ # Parse environment parameter
10
+ [ -n " $PT_environment " ] && ENV_FLAG=" --environment $PT_environment " || unset ENV_FLAG
11
+
9
12
# Wait for up to five minutes for an in-progress Puppet agent run to complete
10
13
# TODO: right now the check is just for lock file existence. Improve the check
11
14
# to account for situations where the lockfile is stale.
35
38
--no-use_cached_catalog \
36
39
--detailed-exitcodes \
37
40
--color false \
41
+ $ENV_FLAG \
38
42
$NOOP_FLAG
39
43
40
44
# Only exit non-zero if an error occurred. Changes (detailed exit code 2) are
You can’t perform that action at this time.
0 commit comments