Skip to content

Commit 7d80de3

Browse files
committed
Apply grubby when reboots is required or vanilla image
1 parent 19d7fa9 commit 7d80de3

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

common/configuration/puppet.yaml.tftpl

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,6 @@ runcmd:
7575
dnf -y install https://yum.voxpupuli.org/openvox8-release-el-$(grep -oP 'VERSION_ID="\K\d*' /etc/os-release).noarch.rpm
7676
dnf -y install openvox-agent-8.23.1
7777
install -m 700 /dev/null /opt/puppetlabs/bin/postrun
78-
# kernel configuration
79-
%{ if cloud_provider != "incus" ~}
80-
systemctl disable kdump
81-
grubby --update-kernel=ALL --args="rd.driver.blacklist=nouveau nouveau.modeset=0 crashkernel=0M initcall_blacklist=algif_aead_init"
82-
grub2-mkconfig -o /boot/grub2/grub.cfg
83-
%{ endif ~}
8478
%{ if cloud_provider == "gcp" ~}
8579
# Google Cloud user-data fact generates a warning because its size is greater than what is allowed (<4096 bytes).
8680
# We have no use for it, so we remove startup-script, user-data and user-data-encoding when running in GCE.
@@ -89,6 +83,15 @@ runcmd:
8983
sed -i "/gce_data\['instance'\] = instance_data/i \ \ \ \ \ \ \ \ \ \ instance_data['attributes'].delete('user-data-encoding')" /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter/resolvers/gce.rb
9084
%{ endif ~}
9185
fi
86+
%{ if cloud_provider != "incus" ~}
87+
# Kernel configuration
88+
- |
89+
if ! test -f /etc/magic-castle-release || ! dnf needs-restarting -r; then
90+
systemctl disable kdump
91+
grubby --update-kernel=ALL --args="rd.driver.blacklist=nouveau nouveau.modeset=0 crashkernel=0M initcall_blacklist=algif_aead_init"
92+
grub2-mkconfig -o /boot/grub2/grub.cfg
93+
fi
94+
%{ endif ~}
9295
%{ if contains(tags, "puppet") ~}
9396
# Install puppetserver
9497
- dnf -y install openvox-server-8.11.0

0 commit comments

Comments
 (0)