Fixes #37499 - clean up unmanaged repositories during host registration
What are your thoughts about this PR @nofaralfasi / @ares? / @stejskalleos Is this something interesting?
If this is something we want, I would suggest to add a GUI to enable/disable cleaning the not managed repositories.
The clean_unmanaged_repositories snippet could be used during usual host provisioning, too.
We already have something in the core: f884bab
The mentioned PR is about removing the repositories which were added during provisioning.
This PR is about removing all repositories which are configured on a host and are not managed by subscription manager. If a host is configured to consume the repositories from foreman/katello and therefore has a subscription-manager registration, we expect to have all repositories maintained by foreman/katello. There should not be any other repository besides the repositories from sub-man.
Thank you for your contribution! This PR has been inactive for 3 months, closing for now. Feel free to reopen when you return to it. This is an automated process.