Problem: Is there maybe a way to avoid the registration for specific hosts that matches for example name patterns?
Right now all nodes that are registered in Puppet appear in Foreman.
I don’t use Pupoetdb.
Expected outcome: Avoid registration of specific nodes.
I don’t think there’s a way to do it. The best place to implement such filtering would probably be here for facts upload registrations and here for reports based registration. The blacklist could be stored in foreman.yaml that both of these callbacks use.
We use Kitchen and Chef to spin up AWS VMs to create CI tests to test if Puppet modules do that what we expect. The tests deliver useful output, so Foreman is not required in this case. But of course the nodes appear in Foreman.
You would need to disable fact uploading. Here is where it’s checked:
You can set it to false in the settings, but that disables it for all hosts on that server. If you have a dedicated test puppetserver, that’s fine. Otherwise you would need to to modify the ENC script to do some filtering.
After that, I don’t think the ENC makes sense (it should fail). That means you can probably short circuit it with an early return.
Lastly, the report uploading should also be disabled for those hosts.