Server registration and puppet

Our systems are not named using the fully Qualified Domain name. when registering the server with foreman it puts it in as servername.localname. then remote execution tasks to initiate a puppet pull fails.

When the server requests a certificate the certificate is called “servername.” it has a full stop on the end of the computer name.

the error puppet gives is as follows
Error: Could not retrieve catalog from remote server: Error 403 on SERVER: Forbidden request: /puppet/v3/catalog/servername. (method :post). Please see the server logs for details

when the name is corrected in foreman it just creates duplicates when the system checks in again. and at the end of the day this error is generated and it doesn’t move past this.

I have found when the host name is set to the fully qualified domain name this all works properly and seamlessly however the environment is full of systems that don’t have the host name as the fully qualified domain name so it is creating issues

Is there a way to set the host to use the fully qualified domain name without setting it as the hostname?

we are using Foreman 3.12

This is more of a Puppet issue than a Foreman one, but maybe this helps:
In the puppet.conf you can set certname, which should default to hostname -f (or something like that). If you set this setting to the fqdn before generating Puppet certs (i.e. usually the first agent run) I guess you should be fine. Never had this usecase though, so no can’t say for sure whether this will work.