Expected outcome:
would like it automatically enabled
Foreman and Proxy versions:
3.12
Been meaning to ask about this as noticed it months ago
Any time we add a new repo to a product and content view - once it syncs - it always gets added to the servers but kept as disabled
It means we need to run a one-liner via Ansible or shell to enable it across our fleet of servers, using subscription-manager
Is there an override option in the settings to enable any new repo when added?
There is no override option for that and it doesn’t really make sense to change it as it would enable any new repository for ALL hosts. Which was really a mess before it changed in 4.9.
You can change the repository set for any host in foreman. If you want to enable a new repository for many or all hosts you can easily do it in foreman.
No, custom products are always disabled by default and this cannot be changed by the user. But you can add content overrides to activation keys, or to existing hosts.
You can also use the web UI under Hosts > Content Hosts > (select your hosts) > Select action > Manage Repository sets. This way you can make changes on multiple hosts at the same time from the server, without the need to run something on each host.
Trying to see it from another perspective. If a new repo gets added and published in a content view, under what circumstances would someone not want that repo applied and enabled to all the hosts that are part of the same CV?
I thought the whole idea of CVs was to restrict content, so if you have a host that shouldn’t use all the repos in that CV, then either manually disable it on that host or if there are multiple then create a new CV for them.
I would expect that new content is added to a CV because users want the majority of hosts to be able to use it, rather than the other way around.
We use the CVs to make sure that each host only accesses repositories which are compatible (el9 repos for el9 hosts, etc.)
When we add a new repository (e.g. postgresql 17 for el8 and el9) then we add it to the cvs, but obviously don’t want it to be enabled automatically on all hosts.
For the foreman user that wishes the new repository is enabled on only part of the CV’s hosts, the auto-disabled sync is the better option. Disabled repos will not do anything on the host if anyone forgets a step as compared to auto-enabled repos.
A bit of history: Years ago, we used to have the default the other way. Then Simple Content Access came along, and people could no longer use the absence of a subscription to control hosts’ access to content. After much discussion it was decided to change the default because it’s a better default in an SCA-only world.
(With the understanding, of course, that our choice of defaults will never be perfect for everyone )
Ah prob would have helped if I explained that we have our CV’s setup (very basically IMO) by OS mostly - so OEL8, OEL9 and Rocky9. Plus 1 or 2 applications.
So if I add a new repo to OEL8 and add that to my OEL8 CV, plus an application CV which contains very similar content - I would want all the hosts in this CV to pick it up without having to manually add it (via the GUI or Ansible/shell). But I get what you guys are saying - it sounds like I’m of the minority here.
I have set it to enable in the activation key - so any new hosts will pick it up. It’s just existing hosts and very new repos.