Skip to content

Commit

Permalink
allow linux kernel args to be set in hieradata
Browse files Browse the repository at this point in the history
  • Loading branch information
rrotter committed Jan 8, 2025
1 parent 3d623ef commit 03adf1f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions manifests/profile/grub.pp
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@
#
# Manage grub.
#
# @param kernel_args Optionally specify kernel args for physical host. Ignored for virtual machines.
#
# @example
# include nebula::profile::grub
class nebula::profile::grub {
class nebula::profile::grub (
String $kernel_args = "console=tty0 console=ttyS1,115200n8 ixgbe.allow_unsupported_sfp=1"
) {
if $facts['is_virtual'] and $facts['virtual'] == 'kvm' {
service { 'getty@hvc0':
ensure => 'running',
Expand Down Expand Up @@ -53,7 +57,7 @@
before => Service['serial-getty@ttyS1'],
;
'/etc/default/grub: ^GRUB_CMDLINE_LINUX':
line => 'GRUB_CMDLINE_LINUX="console=tty0 console=ttyS1,115200n8 ixgbe.allow_unsupported_sfp=1"',
line => "GRUB_CMDLINE_LINUX=\"${kernel_args}\"",
match => '^GRUB_CMDLINE_LINUX=',
;
'/etc/default/grub: ^GRUB_CMDLINE_LINUX_DEFAULT':
Expand Down

0 comments on commit 03adf1f

Please sign in to comment.