Static Network info is not applied during preseeding on Debian like OSes
When deploying a new instance of Debian/Ubuntu via PXE/DHCP, the Debian Installer ignores static network config.
The problem is described here:
"preseeding the network configuration won't work if you're loading your preconfiguration file from the network"
"Although preseeding the network configuration is normally not possible when using network preseeding (using “preseed/url”), you can use the following hack to work around that, for example if you'd like to set a static address for the network interface. The hack is to force the network configuration to run again after the preconfiguration file has been loaded by creating a “preseed/run” script containing the following commands: kill-all-dhcp; netcfg"
The hack outlined above works, in that the deployed machine has the correct static network info, and is not set to use dhcp. However, the machines hostname and domainname are not set correctly. They are set from DNS, which may not be correct. The fix here is to correct /etc/hostname, /etc/hosts, /etc/resolv.conf and /etc/network/interfaces, in the finish script, before the puppet agent is started on the machine.
Pull request here: https://github.com/theforeman/community-templates/pull/127
Apologies if this does not meet standards or is too hacky, at the very least it brings this issue to light :)