Changing Hostgroup doesn't change settings on existing host


I’m trying to use hostgroups like Cobbler “Profiles” to set the correct settings to re-image my existing systems for routine upgrades (example: Ubuntu 18 > 20 > 22 or CentOS 6 > 7 > AlmaLinux 8).

When I select the new hostgroup on an existing host, the OS/Media/Ptable/etc don’t update appropriately to prepare the machine for a re-install with the new OS.

I have host groups setup like this:

Name: centos-7-serv-x86_64

  • Operating system: CentOS 7
  • Media: CentOS 7 Mirror
  • Partition Table: my-custom-ptable-centos

Name: alma-8-serv-x86_64

  • Operating system: AlmaLinux 8
  • Media: AlmaLinux 8 Mirror
  • Partition Table: my-custom-ptable-alma

…so on a host with the centos-7-serv-x86_64 hostgroup, changing it to alma-8-serv-x86_64 - I still have to manually correct the drop-downs for Operating system, Media, Ptable, etc.

Expected outcome:

Selecting a new hostgroup would update the settings that are part of that hostgroup. This would make it easy for someone who’s not Foreman proficient to login, flip a hostgroup, click build, and reboot the system for imaging. Is there a better way to achieve this?

Foreman and Proxy versions:

Foreman 3.1 & 3.3 and Satellite 6.11 (and iirc multiple prior versions I’d homelab’ed)

Foreman and Proxy plugin versions:

Distribution and version:

Tried AlmaLinux 8 & RHEL 8

Other relevant data:

Did anyone find solutions to this. I am also facing same issue. where i am using Foreman 2.5.

Seen this behavior when using host groups with SCAP. If I change the host group that contains a SCAP policy to one that does not, the host still has the SCAP policy from the old host group. So forced to unassign the SCAP policy manually for those hosts.

@tedevil , I am not using SCAP but still hosgroup does not keep OS settings while rebuild with other host group. I need to manually assign them.

The circumstances under which those parameters get saved at the host level have been unclear to me also. I usually end up deleting the hosts and recreating them (with the hammer CLI).

in my case i am trying to retain IP same in which this rebuild option is very helpful.
But somehow when i attached new hostgroup it does not build with new OS mapped to this hostgroup , i have to select manually OS tab. As i am trying to automate it hence looking for workaround if we have any.