Skip to content

Latest commit

 

History

History
424 lines (246 loc) · 12.9 KB

REFERENCE.md

File metadata and controls

424 lines (246 loc) · 12.9 KB

Reference

Table of Contents

Classes

Functions

Classes

profile_update_os

configure functionality for upgrading OS packages

Examples

include profile_update_os

Parameters

The following parameters are available in the profile_update_os class:

root_cron_scripts_dir

Data type: String

Directory where root cron scripts exist

profile_update_os::kernel_upgrade

Apply kernel updates via cron

Examples

include profile_update_os::kernel_upgrade

Parameters

The following parameters are available in the profile_update_os::kernel_upgrade class:

enabled

Data type: Boolean

state of whether kernel updates via cron are enabled

message

Data type: String

Message broadcast to users before update and reboot

random_delay

Data type: Integer

Maximum number of minutes to random delay before applying kernel updates

reboot_always

Data type: Boolean

Always trigger reboot even if no updates require it

reboot_num_pkgs_updated_since_reboot

Data type: Integer

Minimum number of packages updated since reboot to trigger reboot Negative value means to ignore and use script default value

reboot_num_pkgs_updated_today

Data type: Integer

Minimum number of packages updated today to trigger reboot Negative value means to ignore and use script default value

reboot_pkgs_list

Data type: Array[String]

List of updated packages that should always trigger reboot

update_day_of_week

Data type: String

Contains day of week abbreviation for kernel update cron e.g. "Sun", "Mon", "Tue", etc. If not defined day of week is calculated from hostname

update_hour

Data type: Integer

Hour for kernel update cron There is a random delay before the kernel update occurs

update_minute

Data type: Integer

Minute for kernel update cron There is a random delay before the kernel update occurs

update_months

Data type: Array[String]

Names of months (as 3 letter abbreviations) for kernel update cron Empty array implies to run every month

update_week_of_month

Data type: String

Week of the month for kernel update cron, e.g. "1"-"5" or "any" If not defined cron runs every week

profile_update_os::kpatch

Install kpatch

Examples

include profile_update_os::kpatch

Parameters

The following parameters are available in the profile_update_os::kpatch class:

enabled

Data type: Boolean

Install kpatch package and start service, noop if set to false (no clean-up)

install_kpatch_patches

Data type: Boolean

Install the kpatch-patch package for the current kernel

kpatch_patch_version

Data type: String

Specify the exact kpatch-patch to install (default is to go to latest)

Example locking kpatch-patch to version+release 0-0 under the 4.18.0-372.41.1 kernel:

profile_update_os::kpatch::kpatch_patch_version: "4_18_0-372_41_1-0-0.el8_6"

profile_update_os::scheduled_reboot

Reboot node at scheduled time via cron

Examples

include profile_update_os::scheduled_reboot

Parameters

The following parameters are available in the profile_update_os::scheduled_reboot class:

command

Data type: String

Command to handle the reboot

enabled

Data type: Boolean

state of whether reboots via cron are enabled

reboot_day_of_week

Data type: String

Contains day of week abbreviation for reboot e.g. "Sun", "Mon", "Tue", etc.

reboot_hour

Data type: Integer

Hour for cron reboot

reboot_minute

Data type: Integer

Minute for reboot

reboot_months

Data type: Array[String]

Names of months (as 3 letter abbreviations) for reboot Empty array implies to run every month

reboot_week_of_month

Data type: String

Week of the month for reboot, e.g. "1"-"5" or "any" If not defined cron runs every week

profile_update_os::yum_upgrade

While the class name refers to 'yum', this class also supports 'zypper' in SUSE.

Examples

include profile_update_os::yum_upgrade

Parameters

The following parameters are available in the profile_update_os::yum_upgrade class:

command

Data type: String

Command to apply yum updates for the OS version

config_file

Data type: String

Full path to yum update config file for the OS version

enabled

Data type: Boolean

State of whether yum updates via cron are enabled

excluded_packages

Data type: Array

List of packages to exclude from yum updates

random_delay

Data type: Integer

Maximum number of minutes to randomly wait before applying yum updates

package

Data type: String

Package name for the yum update package for the OS version

service

Data type: String

Service name for the yum update service for the OS version

update_day_of_week

Data type: String

Day of week abbreviation for yum update cron e.g. "Sun", "Mon", "Tue", etc. If not defined day of week is calculated from hostname

update_hour

Data type: Integer

Hour for yum update cron There is a random delay of up to 30 minutes before the yum update occurs

update_minute

Data type: Integer

Minute for yum update cron There is a random delay of up to 30 minutes before the yum update occurs

update_months

Data type: Array[String]

Names of months (as 3 letter abbreviations) for kernel update cron Empty array implies to run every month

update_week_of_month

Data type: String

Week of the month for yum update cron, e.g. "1"-"5" or "any" If not defined cron runs every week

yum_config_file

Data type: String

Full path to yum config file for the OS version

Functions

profile_update_os::calculate_day_of_week

Type: Puppet Language

Select the default day of the week that a host applies os updates. Wed is default to avoid holidays, long weekends, etc. dev/test nodes update the day before the default for testing.

profile_update_os::calculate_day_of_week(String $hostname)

Select the default day of the week that a host applies os updates. Wed is default to avoid holidays, long weekends, etc. dev/test nodes update the day before the default for testing.

Returns: String

hostname

Data type: String

profile_update_os::calculate_week_of_month

Type: Puppet Language

Select the default week of the month that a host applies os updates. Calculated to be the modulus 4 of the last character of the short hostname.

profile_update_os::calculate_week_of_month(String $hostname)

Select the default week of the month that a host applies os updates. Calculated to be the modulus 4 of the last character of the short hostname.

Returns: String

hostname

Data type: String