<% if @host.params['kt_activation_keys'] %> # add subscription manager yum -t -y -e 0 install subscription-manager rpm -ivh <%= subscription_manager_configuration_url(@host) %> echo "Registering the System" subscription-manager register --org="<%= @host.rhsm_organization_label %>" --name="<%= @host.name %>" --activationkey="<%= @host.params['kt_activation_keys'] %>" <% if @host.operatingsystem.name == "RedHat" %> # add the rhel rpms to install katello agent subscription-manager repos --enable=rhel-*-rh-common-rpms <% end %> echo "Installing Katello Agent" yum -t -y -e 0 install katello-agent chkconfig goferd on <% end %>