I have set up a PXE server that does a fully automated installation of both Ubuntu 18.04 server and Centos 7.6.
My issue is that after installation, the Ubuntu systems have my PXE server IP in their sources.list file, and I want them to point to the internet repos.
The Centos systems have the internet network repos, so it has to be possible to do this.
Both installers use a url directive for the pointer to local installation files. The Centos installation uses a kickstart file, and the ubuntu one is a hybrid kickstart/preseed file.
I only have the specific files I need for the base servers, so I need them to be updated after they are deployed.
My current workaround is to do a post install copy of a local sources.list file to replace the one Ubuntu creates automatically during installation, but this feels like a hack.
I have found no way to do this correctly using preseeds, and I also have found no automated way to make this change after the installation completes.
I would think that, for example, if you did your initial installation in the US, but moved to Japan, you would want an automated way to change your sources.list file from ...us.archive... to ...jp.archive...
So, my request is for either
an example PXE preseed file that uses a local repo for installation and then sets up the internet repos for your location when the os installation is finished,
a Ubuntu executable that can be run to automatically update your sources.list file if your geographic location changes.