Client keeps getting created with wrong domain


I provisioned a new host with the domain set to “” in the hostgroup. This host is visible in the Hosts view in Foreman, but does not report to foreman after installation.
Instead a second host appeared with the same hostname, but a different domain ( Thios domain is not configured in Foreman. Whenever I delete this host, it keeps getting recreated on every puppet run. The domain on the host is correct, checked with hostname and hostnamectl.

Where does this additional host/domain come from? How can I get rid of it? How can I make the correct host to report to foreman?

The name of the host comes from the report of the puppet run and is based on the certificate. This is created based on the certname in the puppet.conf. Can you check this, probably remove or correct the setting, recreate and sign the certificate? Afterwards it should run fine.

The domain name in certname in puppet.conf is correct ( Also the Subject in the certificate holds the right domain. So I don’t think it comes from there.
Any other clues?

This is from the foreman log. the certificate name is correct( Where does that name parameter come from (

 2019-07-05T12:07:30 [I|app|1ba6a]   Parameters: {"facts"=>"[FILTERED]", "name"=>"", "certname"=>"", "apiv"=>"v2", "host"=>{"certname"=>"", "name"=>""}}
2019-07-05T12:07:30 [I|app|1ba6a] Import facts for '' completed. Added: 106, Updated: 0, Deleted 0 facts
2019-07-05T12:07:31 [I|aud|1ba6a] Nic::Managed (170) create event on name

The name attribute should come from the facts, so from hostname -f. Was the name changed and the service not restarted? Does /etc/hosts include a matching entry?

Thank you. This put me in the right direction.

hostname -f