Skip to content
This repository has been archived by the owner on Jul 9, 2020. It is now read-only.

Commit

Permalink
Add params for katello-host-tools
Browse files Browse the repository at this point in the history
  • Loading branch information
sean797 authored and mmoll committed Jun 4, 2018
1 parent c133a43 commit 8fb3721
Showing 1 changed file with 25 additions and 7 deletions.
32 changes: 25 additions & 7 deletions provisioning_templates/snippet/redhat_register.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ snippet: true
# 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.
#
# activation_key = <key> Activation key string, not needed if using
# subscription-manager with username/password
#
Expand Down Expand Up @@ -69,12 +73,16 @@ snippet: true
subscription_manager_org = @host.rhsm_organization_label
activation_key = host_param('kt_activation_keys')
redhat_install_agent = true
redhat_install_host_tools = true
redhat_install_host_tracer_tools = false
else
subscription_manager_certpkg_url = host_param('subscription_manager_certpkg_url')
subscription_manager_atomic_url = host_param('subscription_manager_atomic_url')
subscription_manager_org = host_param('subscription_manager_org')
activation_key = host_param('activation_key')
redhat_install_agent = host_param_true?('redhat_install_agent')
redhat_install_host_tools = host_param_true?('redhat_install_host_tools')
redhat_install_host_tracer_tools = host_param_true?('redhat_install_host_tracer_tools')
end
%>

Expand Down Expand Up @@ -131,14 +139,24 @@ snippet: true
<%= "subscription-manager repos --enable #{host_param('subscription_manager_repos').gsub(',', ' --enable')}" %>
<% end %>

<% if redhat_install_agent && !atomic %>
if [ -f /usr/bin/dnf ]; then
dnf -y install katello-agent
else
yum -t -y install katello-agent
fi
<% if !atomic %>
<% if redhat_install_agent || 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 %>

chkconfig goferd on
<% if redhat_install_agent %>
$PACKAGE_MAN install katello-agent
<% elsif redhat_install_host_tools %>
$PACKAGE_MAN install katello-host-tools
<% end %>

<% if redhat_install_host_tracer_tools %>
$PACKAGE_MAN install katello-host-tools-tracer
<% end %>
<% end %>
<% end %>

Expand Down

0 comments on commit 8fb3721

Please sign in to comment.