Hostgroups from custom facts

Hello everybody,

I want to set custom facts with the host groups that I use and foreman to get the facts and set them on the host group. How can I do that?

See if this plugin helps GitHub - theforeman/foreman_default_hostgroup: A plugin to set the default hostgroup when hosts are created.