Subscription manager

I have Rocky 8 systems built from templates. I am attempting to subscribe them to the Foreman server. Correct content views and activation keys have been set up.
From the command line of the Rocky 8 server:
subscription-manager register --org=“my org” --activationkey=“my activation key”
Running this command from the client is successful and the repo’s contained within the content view can be seen and utilised. And the client system appears in the lists of hosts on the Foreman server. However I cannot find a way of assigning these clients to the correct hostgroup. When I try to edit the host on Foreman and assign the pre configured host group to the client an error occurs.
It would be ideal if I could run a command from the client such as:
subscription-manager register --org=“my org” --activationkey=“my activation key” --hostgroup
Is there a way to assign via subscription manager from a host to a specific hostgroup?

Any ideas would be welcome.

Foreman and Proxy versions:

Foreman version 3.0.2 katello 4.2.2

Thank you

Hi,

You’ve got an extremely old version of Foreman and Katello. I would recommend upgrading to a supported version if possible. Current is 3.6 / 4.8, soon to be 3.7 / 4.9.

Subscription-manager has no knowledge of hostgroups, as hostgroups are a Foreman-only concept and sub-man supports registration to things other than Foreman. To get a hostgroup assigned during registration, I’d recommend the Global Registration feature (Hosts > Register Host). The documentation is here: Managing Hosts

1 Like

Thank you for your reply jeremyLenz
Yes it is an old version, unfortunately we are stuck with it at the moment. We do have plans to upgrade possibly using a docker version of Foreman.
I will look into your suggestion. Never an easy solution with IT.

Thanks for your help