grub_config
: Manages global GRUB configuration parametersgrub_menuentry
: Manages menu entries in the GRUB and GRUB2 systems. NOTE: This may not cover all possible options and some options may apply to eithergrub_user
: Manages GRUB2 Users - Does not apply to GRUB Legacy Note: This type compares against the active GRUB configuration. The contents of the makernel_parameter
: Manages kernel parameters stored in bootloaders.
Manages global GRUB configuration parameters
The following properties are available in the grub_config
type.
Valid values: present
, absent
The basic property that the resource should be in.
Default value: present
Value of the GRUB parameter.
The following parameters are available in the grub_config
type.
namevar
The parameter that you wish to set.
In the case of GRUB < 2, this will be something like 'default', 'timeout', etc...
See info grub
for additional information.
With GRUB >= 2, this will be 'GRUB_DEFAULT', 'GRUB_SAVEDEFAULT', etc..
See info grub2
for additional information.
The specific backend to use for this grub_config
resource. You will seldom need to specify this --- Puppet will
usually discover the appropriate provider for your platform.
The bootloader configuration file, if in a non-default location for the provider.
Manages menu entries in the GRUB and GRUB2 systems.
NOTE: This may not cover all possible options and some options may apply to either GRUB or GRUB2!
The following properties are available in the grub_menuentry
type.
Valid values: true
, false
Explicitly enable, or disable, BLS support for this resource.
Has on effect on systems that are not BLS enabled.
Add this Array of classes to the menuentry.
Valid values: true
, false
If set, make this menu entry the default entry.
If more than one of these is set to true
across all :menuentry
resources, this is an error.
In GRUB2, there is no real guarantee that this will stick since entries further down the line may have custom scripts which alter the default.
NOTE: You should not use this in conjunction with using the :grub_config type to set the system default.
Valid values: present
, absent
The basic property that the resource should be in.
Default value: present
Valid values: %r{^(/.*|:(default|preserve):)}
The path to the initrd image.
Set this to ':default:' to copy the default kernel initrd if one exists.
Set this to ':preserve:' to preserve the current entry. If a current entry does not exist, the default will be copied. If there is no default, this is an error.
Valid values: %r{^(/.*|:(default|preserve):)}
The path to the kernel that you wish to boot.
Set this to ':default:' to copy the default kernel if one exists.
Set this to ':preserve:' to preserve the current entry. If a current entry does not exist, the default will be copied. If there is no default, this is an error.
An array of kernel options to apply to the :kernel property.
The following format is supported for the new options: ':defaults:' => Copy defaults from the default GRUB entry ':preserve:' => Preserve all existing options (if present)
Note: ':defaults:' and ':preserve:' are mutually exclusive.
All of the options below supersede any items affected by the above
'entry(=.)?' => Ensure that entry
exists as entered; replaces all
other options with the same name
'!:entry(=.)?' => Add this option to the end of the arguments
preserving any other options of the same name
'-:entry' => Ensure that all instances of entry
do not exist
'-:entry=foo' => Ensure that only instances of entry
with value foo
do not exist
Note: Option removals and additions have higher precedence than preservation
Default value: :preserve:
Valid values: true
, false
If set, ensure that linux16
and initrd16
are used for the kernel entries.
Will default to true
unless the entry is a BLS entry.
Valid values: true
, false
If true, add the load_video
command to the menuentry.
Will default to true
unless the entry is a BLS entry.
Valid values: true
, false
In Legacy GRUB, having this set will add a 'makeactive' entry to the menuentry.
Default value: false
An Array of module entry Arrays that apply to the given entry. Since each Multiboot format boot image is unique, you must know what you wish to pass to the module lines.
The one exception to this is that many of the linux multiboot settings require the kernel and initrd to be passed to them. If you set the ':defaults:' value anywhere in the options array, the default kernel options will be copied to that location in the output.
The following format is supported for the new options: ':defaults:' => Copy default options from the default kernel GRUB entry ':preserve:' => Preserve all existing options (if present)
Note: ':defaults:' and ':preserve:' are mutually exclusive.
All of the options below supersede any items affected by the above
'entry(=.*)?' => Ensure that `entry` exists *as entered*; replaces all
other options with the same name
'!:entry(=.*)?' => Add this option to the end of the arguments
preserving any other options of the same name
'-:entry' => Ensure that all instances of `entry` do not exist
'-:entry=foo' => Ensure that only instances of `entry` with value `foo` do not exist
Note: Option removals and additions have higher precedence than preservation
Example: modules => [ ['/vmlinuz.1.2.3.4','ro'], ['/initrd.1.2.3.4'] ]
An Array of plugins that should be included in this menuentry.
Will default to ['gzio','part_msdos','xfs','ext2']
unless the entry is a BLS entry.
Valid values: %r{\(.*\)}
The filesystem root.
In GRUB2, having this set will add a requirement for the listed users to authenticate to the system in order to utilize the menu entry.
Default value: [:unrestricted]
The following parameters are available in the grub_menuentry
type.
Valid values: true
, false
, yes
, no
If set, when using the ':preserve:' option in kernel_options
or
modules
will add the system defaults if the entry is being first
created. This is the same technique that grub2-mkconfig uses when
procesing entries.
Default value: true
namevar
The name of the menu entry.
The specific backend to use for this grub_menuentry
resource. You will seldom need to specify this --- Puppet will
usually discover the appropriate provider for your platform.
The bootloader configuration file, if in a non-default location for the provider.
Manages GRUB2 Users - Does not apply to GRUB Legacy
Note: This type compares against the active GRUB configuration. The contents of the management file will not be updated unless the active configuration is out of sync with the expected configuration.
The following properties are available in the grub_user
type.
Valid values: present
, absent
The basic property that the resource should be in.
Default value: present
The user's password. If the password is not already in a GRUB2 compatible form, it will be automatically converted.
Valid values: true
, false
Purge all unmanaged users.
This does not affect any users that are not defined by Puppet! There is no way to reliably eliminate the items from all other scripts without potentially severely damaging the GRUB2 build scripts.
Default value: false
The following parameters are available in the grub_user
type.
namevar
The username of the GRUB2 user to be managed.
The specific backend to use for this grub_user
resource. You will seldom need to specify this --- Puppet will usually
discover the appropriate provider for your platform.
Valid values: true
, false
Report any unmanaged users as a warning during the Puppet run.
Default value: false
Valid values: %r{^\d+$}
The rounds to use when hashing the password.
Default value: 10_000
Valid values: true
, false
If set, add this user to the 'superusers' list, if no superusers are set, but grub_user resources have been declared, a compile error will be raised.
Default value: false
The file to which to write the user information.
Must be an absolute path.
Default value: /etc/grub.d/02_puppet_managed_users
Manages kernel parameters stored in bootloaders.
The following properties are available in the kernel_parameter
type.
Valid values: present
, absent
The basic property that the resource should be in.
Default value: present
Value of the parameter if applicable. Many parameters are just keywords so this must be left blank, while others (e.g. 'vga') will take a value.
The following parameters are available in the kernel_parameter
type.
Valid values: all
, default
, normal
, recovery
Boot mode(s) to apply the parameter to. Either 'all' (default) to use the parameter on all boots (normal and recovery mode), 'default' for just the default boot entry, 'normal' for just normal boots or 'recovery' for just recovery boots.
Default value: all
namevar
The parameter name, e.g. 'quiet' or 'vga'.
The specific backend to use for this kernel_parameter
resource. You will seldom need to specify this --- Puppet will
usually discover the appropriate provider for your platform.
The bootloader configuration file, if in a non-default location for the provider.