Oranization label and redhat repositories

Problem:

Hi, we have redhat subscriptions in foreman, using those results in a redhat.repo file, that has all repositories prefixed with the organization label, except those repositories coming from the redhat subscription, like

[rhel-9-for-x86_64-baseos-rpm]

I have not found a flag or config option to change that behaviour and since I feel like this is intended, I came here to ask if that is the case, thanks.

Expected outcome:

if my organization is named “FOOBAR”, the repository name should be
[FOOBAR_rhel-9-for-x86_64-baseos-rpm]

Foreman and Proxy versions:
foreman 3.3.1

Foreman and Proxy plugin versions:
katello 4.5.1

Distribution and version:
centos7

Pretty sure this is intentional.

What is your usecase for having the ORG label in there?

Thanks, we’re doing updates only on repositories that match a specific pattern, which would be ‘starts with ORG label’ like

dnf --disablerepo="*" --enablerepo="${LABEL}_*" ...

Shouldn’t the machine already be getting only “approved” repos because it’s subscribed to Foreman?

Or do you have non-foreman-managed repos in /etc/yum.repos.d?

Yes, there might be cases where other repositories are on the maschines too, that are not provided by foreman. Customer can do whatever he wants on his maschines, we just have to make sure os updates are applied on a regular basis and leave the custom stuff in the customers scope.