Affected Puppet, Ruby, OS and module versions/distributions
Puppet-Server: 6.26.0
Puppet-Agent: 6.28.0
Distribution: Ubuntu 20.04.4
Module version: 3.2.0
How to reproduce (e.g Puppet code you use)
Using a puppet lookup with either 'deep', or 'hash' merge type (as below)
class profile::hiera::kernel_parameters {
# Lookup for kernel_parameter resources
lookup( 'kernel_parameters', Hash[String, Any], 'deep', {} ).each |String $name, Any $options| {
# Set kernel_parameter resources
ensure_resource( 'kernel_parameter', $name, $options )
}
}
Specifying a kernel parameter in hiera without a specific 'bootmode' given, and also specifying some other kernel parameters elsewhere in the hiera hierarchy.
global.yaml - lowest priority
# Configure kernel parameters at boottime
kernel_parameters:
# disable ipv6 by default on every machine
ipv6.disable:
ensure: present
value: '1'
The above can result in the kernel parameter (ipv6.disable) being duplicated between the GRUB_CMDLINE_LINUX_DEFAULT and GRUB_CMDLINE_LINUX sections of /etc/default/grub file, similar to #38
Affected Puppet, Ruby, OS and module versions/distributions
How to reproduce (e.g Puppet code you use)
Using a puppet lookup with either 'deep', or 'hash' merge type (as below)
Specifying a kernel parameter in hiera without a specific 'bootmode' given, and also specifying some other kernel parameters elsewhere in the hiera hierarchy.
global.yaml - lowest priority
node.yaml - highest priority
What are you seeing
The above can result in the kernel parameter (ipv6.disable) being duplicated between the GRUB_CMDLINE_LINUX_DEFAULT and GRUB_CMDLINE_LINUX sections of
/etc/default/grub
file, similar to #38What behaviour did you expect instead
Kernel parameters should only appear in one of either GRUB_CMDLINE_LINUX_DEFAULT or GRUB_CMDLINE_LINUX, but not both.
Explicitly specifying a bootmode will cause the kernel parameter to only appear in one of the two GRUB_CMDLINE* sections as expected.
Output log
Any additional information you'd like to impart