Register Systems to Foreman/Katello without managing repos

Problem:

Is their a obvious way to register a host to Foreman to use puppet /enc without managing the repositorys?

Or do i need to run subscription-manage register with manage_repos = 0?

We want to use puppet on Azure RHEL PAYG Systems but don’t want to manage the repos with Katello because of the RHUI Infrastructure in Azure.

Expected outcome:

Simple reigster command to manage the systems via puppet.

Foreman and Proxy versions:

Foreman 3.17.2 Katello 4.19

Do you need the package version reported to Katello? If not and everything is already handled in Azure, I would not care about subscription-manager and content at all. In this case a puppet report creating an unmanaged host should be enough. If you want it to assign a hostgroup, you can look into the default hostgroup plugin which allows to provide a mapping of facts to hostgroup.

1 Like

Ah ok, so when puppet runs on the host and uploads the report of a unknown host it creates the host in Foreman?

That would be enough.

@Dirk do you have experience on how to assign owner and location on first puppet run? I cannot set them as default in the hostgroup but maybe it is possible to set them via custom facts or a special parameter?

Unfortunately no, my best idea for a Puppet environment would be a bulk action via UI or hammer. With hammer this could be converted to a cronjob if needed.

Thanks for the help, fyi I found the facts foreman_location and foreman_hostgroup which allow to manage them. Settings > Facts as some facts which allow changes. I haven’t found anything for owner, which might be good because only the owner or someone with correct permissions should be allowed to do that.

If you could change that via facts their might be some security problems.

One interesting fact is foreman_comment which changes the Comment in the UI. I only found that one while searching through the code.

1 Like

We accomplish this by creating a content view that doesn’t contain any repositories. We get the host registered to the system and foreman has no repositories to manage.