Este contenido no está disponible en el idioma seleccionado.

Chapter 4. Managing Activation Keys


Activation keys define the subscription properties of a host. Using an activation key improves the speed of host registration. For web UI equivalents of the following procedures see the Red Hat Satellite Host Configuration Guide.

There are three possible use cases for activation keys:

Note

Activation keys are only used when hosts are registered. If changes are made to an activation key, it is only applicable to hosts that are registered with the amended activation key in the future. The changes are not made to existing hosts.

To create an activation key, issue the following command:

$ hammer activation-key create --name <ak_name> \
--organization-label <org_label> \
--content-view <cv_name> \
--lifecycle-environment <lc_name>
Copy to Clipboard Toggle word wrap

Note that the Content View has to be published. To see the full list of operations related to activation keys, use the hammer activation-key --help command.

To add a subscription to the activation key, issue the following command:

$ hammer activation-key add-subscription \
--id <ak_ID> \
--subscription-id <sub_ID>
Copy to Clipboard Toggle word wrap

To find the activation key ID, use hammer activation-key list; to find the subscription ID, use hammer subscription list.

Example 4.1. Creating an Empty Activation Key

This example shows how to create an activation key that directs the associated hosts to automatically attach a best fitting subscription:

$ hammer activation-key create \
--name "automatically attach key" \
--organization $ORG \
--content-view cv-rhel7-server \
--lifecycle-environment Testing
Copy to Clipboard Toggle word wrap

As a result, hosts registered in the cv-rhel7-server Content View are associated with this activation key.

Example 4.2. Creating an Activation Key with Custom Subscription Pool

This example shows how to create an activation key that will direct the associated hosts to automatically attach a best fitting subscription from the list specified in the activation key.

First create an empty activation key:

$ hammer activation-key create \
--name "custom pool key" \
--organization $ORG \
--content-view cv-rhel7-server \
--lifecycle-environment Testing
Copy to Clipboard Toggle word wrap

Add a subscription to the activation key:

$ hammer activation-key add-subscription \
--name "custom pool key" \
--subscription-id 1
Copy to Clipboard Toggle word wrap

Keep repeating this step to add all required subscriptions to the activation key.

Example 4.3. Creating an Activation Key with Mandatory Subscription List

This example shows how to create an activation key that will direct the associated hosts to attach all subscriptions specified in the activation key.

First, create an activation key and add all required subscriptions to it. Follow the steps from Example 4.2, “Creating an Activation Key with Custom Subscription Pool”.

Then disable the auto-attach property of the activation key:

$ hammer activation-key update \
--organization $ORG \
--name "mandatory subs key" \
--auto-attach false
Copy to Clipboard Toggle word wrap
Important

You can assign several activation keys to a Content View. In case of conflicting settings, the values from the last specified key take precedence. You can specify the order of precedence by setting a host group parameter as follows:

$ hammer hostgroup set-parameter \
--name kt_activation_keys \
--value <name_of_first_key>, <name_of_second_key>,... \
--hostgroup <hostgroup_name>
Copy to Clipboard Toggle word wrap
Volver arriba
Red Hat logoGithubredditYoutubeTwitter

Aprender

Pruebe, compre y venda

Comunidades

Acerca de la documentación de Red Hat

Ayudamos a los usuarios de Red Hat a innovar y alcanzar sus objetivos con nuestros productos y servicios con contenido en el que pueden confiar. Explore nuestras recientes actualizaciones.

Hacer que el código abierto sea más inclusivo

Red Hat se compromete a reemplazar el lenguaje problemático en nuestro código, documentación y propiedades web. Para más detalles, consulte el Blog de Red Hat.

Acerca de Red Hat

Ofrecemos soluciones reforzadas que facilitan a las empresas trabajar en plataformas y entornos, desde el centro de datos central hasta el perímetro de la red.

Theme

© 2025 Red Hat