|
27 | 27 | # Name of the plan to use for disabling/enabling monitoring steps of the workflow. |
28 | 28 | # To configure this globally, use the `patching_monitoring_plan` var. |
29 | 29 | # |
| 30 | +# @param [Optional[String]] update_provider |
| 31 | +# What update provider to use. For Linux (RHEL, Debian, SUSE, etc.) this parameter |
| 32 | +# is not used. For Windows the available values are: 'windows', 'chocolatey', 'all' |
| 33 | +# (both 'windows' and 'chocolatey'). The default value for Windows is 'all'. If 'all' |
| 34 | +# is passed and Chocolatey isn't installed then Chocolatey will simply be skipped. |
| 35 | +# If 'chocolatey' is passed and Chocolatey isn't installed, then this will error. |
| 36 | +# |
30 | 37 | # @param [Optional[String]] pre_update_plan |
31 | 38 | # Name of the plan to use for executing the pre-update step of the workflow. |
32 | 39 | # |
|
108 | 115 | Optional[Boolean] $monitoring_enabled = undef, |
109 | 116 | Optional[String] $monitoring_plan = undef, |
110 | 117 | Optional[String] $pre_update_plan = undef, |
| 118 | + Optional[String] $update_provider = undef, |
111 | 119 | Optional[String] $post_update_plan = undef, |
112 | 120 | Optional[Enum['only_required', 'never', 'always']] $reboot_strategy = undef, |
113 | 121 | Optional[String] $reboot_message = undef, |
|
165 | 173 | $reboot_message_group = pick($reboot_message, |
166 | 174 | $group_vars['patching_reboot_message'], |
167 | 175 | 'NOTICE: This system is currently being updated.') |
| 176 | + $update_provider_group = pick_default($update_provider, |
| 177 | + $group_vars['patching_update_provider'], |
| 178 | + undef) |
168 | 179 | $reboot_wait_group = pick($reboot_wait, |
169 | 180 | $group_vars['patching_reboot_wait'], |
170 | 181 | 300) |
|
192 | 203 |
|
193 | 204 | ## Check for updates on hosts |
194 | 205 | $available_results = run_plan('patching::available_updates', $ordered_targets, |
195 | | - format => 'pretty', |
196 | | - noop => $noop) |
| 206 | + provider => $update_provider_group, |
| 207 | + format => 'pretty', |
| 208 | + noop => $noop) |
197 | 209 | $update_targets = $available_results['has_updates'] |
198 | 210 | if $update_targets.empty { |
199 | 211 | next() |
|
219 | 231 |
|
220 | 232 | ## Run package update. |
221 | 233 | $update_result = run_task('patching::update', $update_targets, |
| 234 | + provider => $update_provider_group, |
222 | 235 | _catch_errors => true, |
223 | 236 | _noop => $noop) |
224 | 237 |
|
|
0 commit comments