Build failure on registration ubuntu hosts

Problem:
When i register ubuntu hosts using a registration script built into the VMware image i get build failures showing up in foreman interface.

The script only contains two parts. first is to use the curl command generated by foreman for host registration with an infinite token life.
the second performs an puppet ssl bootstrap command to generate and register the ssl certificate for the host endpoint.

When you run the curl command manually it fails too. I believe it is because it is trying to install the puppet agent however the command that foreman uses to install this agent puts a legacy puppet agent on. so i have apt hold preventing the installation of that version.

there seems to be no functionality loss within foreman however unfortunately it creates an error in the foreman interface that has to be cleared. my employer doesn’t like this so i really need to find a solution.

Additionally when i go into logs from os installer it directs me to look in registration log file however no such log file exists on either the foreman server or the host endpoint so it makes troubleshooting it really difficult.

Foreman Katello 3.1.2

Distro
Ubuntu 22.04LTS

ok a little more context to this. the ubuntu 20.04 repo seems to have puppet 5 and if you want puppet 7 the package to get is puppet-agent. is there a way to change the package foreman requests to be installed?