|
16 | 16 | # specified, PEAdm will attempt to download PE installation media from its
|
17 | 17 | # standard public source. When specified, PEAdm will download directly from the
|
18 | 18 | # URL given.
|
| 19 | +# @param final_agent_state |
| 20 | +# Configures the state the puppet agent should be in on infrastructure nodes |
| 21 | +# after PE is upgraded successfully. |
19 | 22 | #
|
20 | 23 | plan peadm::upgrade (
|
21 | 24 | # Standard
|
|
37 | 40 | Optional[String] $internal_compiler_b_pool_address = undef,
|
38 | 41 |
|
39 | 42 | # Other
|
40 |
| - Optional[String] $token_file = undef, |
41 |
| - String $stagingdir = '/tmp', |
42 |
| - Enum[direct,bolthost] $download_mode = 'bolthost', |
43 |
| - Boolean $permit_unsafe_versions = false, |
| 43 | + Optional[String] $token_file = undef, |
| 44 | + String $stagingdir = '/tmp', |
| 45 | + Enum['running', 'stopped'] $final_agent_state = 'running', |
| 46 | + Enum[direct,bolthost] $download_mode = 'bolthost', |
| 47 | + Boolean $permit_unsafe_versions = false, |
44 | 48 |
|
45 | 49 | Optional[Enum[
|
46 | 50 | 'upgrade-primary',
|
|
349 | 353 | }
|
350 | 354 |
|
351 | 355 | peadm::plan_step('finalize') || {
|
352 |
| - # Ensure Puppet running on all infrastructure targets |
| 356 | + $service_state = $final_agent_state ? { |
| 357 | + 'running' => 'start', |
| 358 | + 'stopped' => 'stop' |
| 359 | + } |
| 360 | + # Configure Puppet agent service status on all infrastructure targets |
353 | 361 | run_task('service', $all_targets,
|
354 |
| - action => 'start', |
| 362 | + action => $service_state, |
355 | 363 | name => 'puppet',
|
356 | 364 | )
|
357 | 365 | }
|
|
0 commit comments