Skip to content

Commit

Permalink
Fixes #36717 - Remove katello-agent leftovers from redhat-register.erb
Browse files Browse the repository at this point in the history
  • Loading branch information
ofedoren committed Sep 4, 2023
1 parent b9986c9 commit 44a30cd
Showing 1 changed file with 2 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ description: |
General parameters:
redhat_install_agent = [true|false] Install the management agent. For Spacewalk,
this is OSAD. For Katello, this is katello-agent.
redhat_install_host_tools = [true|false] Install the katello-host-tools yum/dnf plugins.
redhat_install_host_tracer_tools = [true|false] Install the katello-host-tools Tracer yum/dnf plugin.
Expand Down Expand Up @@ -82,8 +79,6 @@ description: |
<% if registration_type == 'subscription_manager' %>
<%
atomic = @host.operatingsystem.respond_to?(:atomic) ? @host.operatingsystem.atomic? : host_param_true?('atomic')
redhat_install_agent_fallback = plugin_present?('katello') && katello_agent_enabled?
redhat_install_agent = host_param_true?('redhat_install_agent', redhat_install_agent_fallback)

if host_param('kt_activation_keys')
subscription_manager_certpkg_url = subscription_manager_configuration_url(@host)
Expand Down Expand Up @@ -217,17 +212,15 @@ description: |
<% end %>
<% if !atomic %>
<% if redhat_install_agent || redhat_install_host_tools || redhat_install_host_tracer_tools %>
<% if redhat_install_host_tools || redhat_install_host_tracer_tools %>
if [ -f /usr/bin/dnf ]; then
PACKAGE_MAN="dnf -y"
else
PACKAGE_MAN="yum -t -y"
fi
<% end %>
<% if redhat_install_agent %>
$PACKAGE_MAN install katello-agent
<% elsif redhat_install_host_tools %>
<% if redhat_install_host_tools %>
$PACKAGE_MAN install katello-host-tools
<% end %>
Expand Down Expand Up @@ -293,13 +286,6 @@ description: |
echo "registration successful."
fi

<% if host_param_true?('redhat_install_agent') %>
if [ -f /usr/bin/dnf ]; then
dnf -y install osad
else
yum -t -y install osad
fi
<% end %>
<% else %>
echo "No activation key found: Not registering"
<% end %>
Expand Down

0 comments on commit 44a30cd

Please sign in to comment.