Skip to content

Commit 84b8642

Browse files
authored
Merge pull request #788 from mlibrary/grub-args
allow linux kernel args to be set in hieradata
2 parents 3d623ef + 3124579 commit 84b8642

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

manifests/profile/grub.pp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,13 @@
66
#
77
# Manage grub.
88
#
9+
# @param kernel_args Optionally specify kernel args for physical host. Ignored for virtual machines.
10+
#
911
# @example
1012
# include nebula::profile::grub
11-
class nebula::profile::grub {
13+
class nebula::profile::grub (
14+
String $kernel_args = 'console=tty0 console=ttyS1,115200n8 ixgbe.allow_unsupported_sfp=1'
15+
) {
1216
if $facts['is_virtual'] and $facts['virtual'] == 'kvm' {
1317
service { 'getty@hvc0':
1418
ensure => 'running',
@@ -53,7 +57,7 @@
5357
before => Service['serial-getty@ttyS1'],
5458
;
5559
'/etc/default/grub: ^GRUB_CMDLINE_LINUX':
56-
line => 'GRUB_CMDLINE_LINUX="console=tty0 console=ttyS1,115200n8 ixgbe.allow_unsupported_sfp=1"',
60+
line => "GRUB_CMDLINE_LINUX=\"${kernel_args}\"",
5761
match => '^GRUB_CMDLINE_LINUX=',
5862
;
5963
'/etc/default/grub: ^GRUB_CMDLINE_LINUX_DEFAULT':

0 commit comments

Comments
 (0)