Ok, so I found the solution. First let me try to describe the problem in a different way, I have been getting advice on how to install Foreman on a system without Internet. While helpful (thanks!), it was not the problem I was seeing.
The problem was, building a new client with Foreman (using it’s deployment capabilities) without Internet was an issue. What happened was the follwing (note, this is in a lab without internet):
- Boot new machine into OS installer
- Installer started working, installing @Core packages
- After installation the ‘redhat_register’ snippet runs, complains that subscription-manager cannot be installed and quits
- Host reboots and is not subscribed to Foreman nor has subscription-manager installed.
The solution is very simple! The ‘Kickstart default’ template mentions in it’s ‘packages’ section that it will include any snippet named "template name + ‘custom packages’ " (in this case ‘Kickstart default custom packages’). So I made that snippet and put in the following line
The result is that the OS installer now includes the subscription-manager package during the first installation of packages (I noticed that the amount of packages installed increased from 319 to 335).
I think the ‘Kickstart default’ template could be improved by always including subscription-manager, as I can’t really think of a scenario where you don’t want to install it while deploying systems with Foreman.
What do you think?