Patching nodes
After configuring patch management, you can start applying patches to nodes. The
patch_server
task enables simply applying patches, while
the group_patching
plan performs health checks before and
after patches are applied.
Patch nodes
Use the patch_server
task to apply patches to nodes.
You can limit patches to security or non-security updates, Windows or *nix nodes, or a
specific patch group.
pe_patch::patch_server
task.pe_patch
tasks.pe_patch
fact to verify the relevant packages
were updated.Patching task parameters
The pe_patch::patch_server
task applies patches to
nodes. When you patch nodes in the console, most of the information for the patch_server
task is prefilled on the Run a
task page, but you can add additional parameters to the task before you run
it.
timeout
- Indicates how much time elapses before the task run times out.
-
security_only
- Indicates whether to apply only security patches.
yum_params
- Indicates additional parameters to include in YUM commands, such as including or excluding repositories.
dpkg_params
- Indicates additional parameters to include in
apt-get
commands. zypper_params
- Indicates additional parameters to include in Zypper commands.
clean_cache
- Indicates if YUM or dpkg caches are cleaned at the start of the task.
reboot
- Indicates if and when nodes reboot during the task run.Note: If the node group you're patching has a
reboot_override
value specified, that value overrides anyreboot
parameter you specify in task runs.
Patch nodes with built-in health checks
Use the group_patching
plan to patch nodes with pre-
and post-patching health checks. The plan verifies that Puppet is configured and running correctly on target nodes, patches the nodes, waits for any
reboots, and then runs Puppet on the nodes to verify that
they're still operational.
pe_patch::group_patching
plan. pe_patch
fact to verify the relevant packages
were updated.Patching plan parameters
The pe_patch::group_patching
plan verifies that Puppet is configured and running correctly on target nodes,
patches the nodes, waits for any reboots, and then runs Puppet on the nodes to verify that they're still operational.
- The Puppet service is enabled and running
- Noop mode and cached catalogs are not enabled
- The run interval is 30 minutes
- Patching options let you control how patching itself is applied, including adding an optional string to arguments passed to your package provider.
- Health check options control when a pre-patching health check and a
post-patching Puppet run occurs.Tip: The
health_check_*
parameters apply patches only to nodes that match values you specify. For example, if you change health_check_service_running to false, the pre-patching health check marks nodes on which the Puppet service is running as "unhealthy" and skips patching them. - Reboot options control when a post-patching reboot occurs, and let you specify a script to execute after patching.
patch_group
- Specifies the patch_group, as defined in the pe_patch class parameter, that you want to base running the plan on.
patch_task_timeout
- Indicates how much time elapses before the task run times out.
security_only
- Indicates whether to apply only security patches.
yum_params
- Indicates additional parameters to include in YUM commands, such as including or excluding repositories.
dpkg_params
- Indicates additional parameters to include in
apt-get
commands. zypper_params
- Indicates additional parameters to include in Zypper commands.
clean_cache
- Indicates if YUM or dpkg caches are cleaned at the start of the task.
sequential_patching
- Indicates if nodes in the specified patch group are patched, rebooted, and the post-reboot script run one a time rather than all at once.
run_health_check
- Indicates whether to do a pre-patching health check and a post-patching Puppet run.
health_check_noop
- Verifies the
noop
setting during pre-patching health checks. health_check_runinterval
- Verifies the
runinterval
setting during pre-patching health checks. health_check_service_running
- Verifies whether the Puppet service is running during pre-patching health checks.
health_check_service_enabled
- Verifies whether the Puppet service is enabled during pre-patching health checks.
health_check_use_cached_catalog
- Verifies the
use_cached_catalog
setting during pre-patching health checks.
-
reboot
- Indicates if and when nodes reboot during the plan run.Note: If the node group you're patching has a
reboot_override
value specified, that value overrides anyreboot
parameter you specify in plan runs. reboot_wait_time
- Indicates how long to wait for nodes to reboot before running a post-patching health check.
post_reboot_scriptpath
- The full path to an executable script or binary on the target node to be run after reboot and before the final Puppet run.