How to generate global registration command using hammer CLI in Red Hat Satellite 6

Solution Verified - Updated

Environment

  • Red Hat Satellite 6.10 and above

Issue

  • There should be a hammer module to generate global registration command in Red Hat Satellite 6

Resolution

  • This functionality was added from Red Hat Satellite 6.10 via This content is not included.Red Hat Bugzilla 1919922.

  • For Red Hat Satellite 6.10 or newer, the below command can be used to get options for generating the command:

    # hammer host-registration generate-command --help
    
  • Following is an example of a hammer command with some of the required options and the resulting output of the same:

       # hammer host-registration generate-command --organization-id 1 --location-id 2 --activation-key Test --setup-remote-execution true
    curl -sS  'https://Satellite.example.com/register?activation_keys=Test&location_id=2&organization_id=1&setup_remote_execution=true' -H 'Authorization: Bearer <token>' | bash
    OR
    You can also use the --jwt-expiration 0 parameter in above command to the set the unlimited value to the expiration of authorization token
    
SBR
Product(s)
Components
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.