Skip to content

Commit

Permalink
Revert "Fixes #37501 - Clean up custom repositories from host registr…
Browse files Browse the repository at this point in the history
…ation"

This reverts commit f884bab.

This is breaking workflow for users who expects to have
these repositories available even after the registration.

It also breaks workflow with custom packages that might
be consume from the repositories.
  • Loading branch information
stejskalleos authored and ekohl committed Jun 21, 2024
1 parent 1bbdf51 commit 49d4405
Showing 1 changed file with 0 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,17 +153,6 @@ register_katello_host(){
# Set up subscription-manager
<%= snippet("subscription_manager_setup", variables: { subman_setup_scenario: 'registration' }).strip -%>

<% unless @repo_data.blank? -%>
# clean repositories which were added for registration purposes (Katello context only)
if [ x$PKG_MANAGER = xdnf -o x$PKG_MANAGER = xyum ]; then
rm -f /etc/yum.repos.d/foreman_registration*.repo
elif [ x$PKG_MANAGER = xzypper ]; then
rm -f /etc/zypp/repos.d/foreman_register*.repo
elif [ -f /etc/debian_version ]; then
rm -f /etc/apt/sources.list.d/foreman_registration*.list
fi
<% end %>

subscription-manager register <%= '--force' if truthy?(@force) %> \
--org='<%= @organization.label if @organization %>' \
--activationkey='<%= activation_keys %>' || <%= truthy?(@ignore_subman_errors) ? 'true' : 'cleanup_and_exit 1' %>
Expand Down

0 comments on commit 49d4405

Please sign in to comment.