Right now we are having an issue with provisioning RHEL 9 machines, where provisioned hosts go into emergency mode after initial reboot.
The problem is in running package upgrade in the
%post section in the
Kickstart template. Luckily we have temporary workaround for it - disable package upgrade and do it after host is rebooted and provisioned.
This leads us to this RFC, where I would like to propose to add a new one shot Systemd service
foreman_first_boot that would run on first machine start and execute a template defined by user.
Service template could contain package upgrades and some other stuff that we do right now in the
SystemD adoption (source)
[Unit] Description=foreman_first_boot [Service] Type=oneshot ExecStart=/etc/foreman/foreman_first_boot.sh RemainAfterExit=false Wants=basic.target After=basic.target network-online.target nss-lookup.target ConditionPathExists=!/etc/foreman/foreman_first_boot_done