Project

General

Profile

« Previous | Next » 

Revision bd1fe677

Added by Dominic Cleal almost 10 years ago

templates - sync from community-templates

View differences:

app/views/unattended/snippets/_redhat_register.erb
#
# subscription_manager_password = <password> (if using hosted RHN)
#
# subscription_manager_host = <hostname> (hostname of SAM/Katello
# installation, if using SAM)
# subscription_manager_certpkg_url = <url> (url of cert package when using
# when using foreman with katello
# for example:
# http://fqdn/pub
# /katello-ca-consumer-latest.noarch.rpm)
#
# subscription_manager_host = <hostname> (deprecated for
# subscription_manager_certpkg_url:
# hostname of SAM/Katello
# installation, if using SAM.
# hostname is used to determine the
# consumer cert url.)
#
# subscription_manager_org = <org name> (organization name, if using
# SAM/Katello)
......
subscription-manager repos --list > /dev/null
<%= enabled_repos if enabled_repos %>
<% elsif @host.params['activation_key'] %>
rpm -Uvh <%= @host.params['subscription_manager_host'] %>/pub/candlepin-cert-consumer-latest.noarch.rpm
<% if @host.params['subscription_manager_certpkg_url'] %>
rpm -Uvh <%= @host.params['subscription_manager_certpkg_url'] %>
<% elsif @host.params['subscription_manager_host'] %>
rpm -Uvh <%= @host.params['subscription_manager_host'] %>/pub/candlepin-cert-consumer-latest.noarch.rpm
<% end %>
subscription-manager register --org="<%= @host.params['subscription_manager_org'] %>" --activationkey="<%= @host.params['activation_key'] %>"
# workaround for RHEL 6.4 bug https://bugzilla.redhat.com/show_bug.cgi?id=1008016
subscription-manager repos --list > /dev/null

Also available in: Unified diff