Moving hosts between "hosts" and "content-hosts"

Problem:
I have some content hosts that I would prefer not be part of a content view.

How do I

  1. “register” a host with foreman without adding it to a content view?
  2. move a content-host to become a mere host?

At the moment, I have a set of ansible scripts that I run to localize after I clone a centos 7 virtual machine template. First it installs the katello-ca-consumer-latest.noarch.rpm file. Second it calls subscription manager to register with an activation key.

Expected outcome:
I would like both versions to be still able to use my foreman repositories, so the repo files will still need to reflect the foreman server. I have noticed this is only generated when I register with subscription manager with a key tied to a content view.

Foreman and Proxy versions:
I am running

  • foreman 2.5.1
  • katello 4.1.0

Distribution and version:
At first this is for Centos 7, but I plan to expand this into other versions such as ubuntu and rocky.

Thanks for your time!

–jason

This doc would help you: Foreman :: Plugin Manuals

Just to expand a bit-- With Katello installed, all hosts are also content hosts. There isn’t really a way to remove a host from the content hosts view and keep it in the all hosts view. We’re working on a new host detail page for a future version of Foreman & Katello that will combine the All Hosts and Content Hosts page, and hopefully make this a bit less confusing.

  1. “register” a host with foreman without adding it to a content view?

To do this, register the host using an activation key that does not have a content view attached. (e.g. set the environment to “Library” and content view to “Default Organization View.”) Alternatively, you can register the host without an activation key, and instead run subscription-manager register with your Foreman username and password.

Also keep in mind, activation keys are not retroactive – they only affect hosts at time of registration. Changes to activation keys after the fact will not affect the host unless you re-register. If you’d like to change a host’s content view, etc. without reregistering, this is totally possible using the web UI from the Content Host details page.

1 Like

Thanks you guys, i appreciate your answers.

–jason