Red Hat Training

A Red Hat training course is available for Red Hat Satellite

Chapter 3. Managing Locations

Locations function similar to organizations, they provide a method to group resources and assign hosts. Differences between organizations and locations are:

  • Locations are based on physical or geographical settings.
  • Locations have hierarchical structure.

3.1. Creating a Location

For Web UI Users

  1. Navigate to Administer > Locations.
  2. Click New Location.

    • Provide the base details for the location:
    • Parent - An optional parent location for this location. This creates a location hierarchy.
    • Name - A plain text name for the location.
    • Description - An optional plain text description for the location.
  3. Click Submit.

    • If you have hosts with no location assigned, you are redirected to the Select Hosts tab. Select between three variants of assigning hosts to the location:

      • Assign All to assign all hosts with no location assigned.
      • Manually Assign to select which hosts to assign to the location.
      • Proceed to Edit to move to the Edit Properties page without assigning hosts to the location.
    • If you do not have hosts with no location assigned, you are redirected to the Edit page, where you can assign infrastructure resources to the location. This includes networking resources, installation media, kickstart templates, and other parameters. You can return to this page at any time by navigating to Administer > Locations and then selecting a location to edit.
  4. After completing your location creation, click Submit.

For CLI Users

Enter the following command to create a location:

# hammer location create \
--parent-id "parent_location_id" \
--name "your_location_name" \
--description "your_location_description"

3.2. Setting the Location Context

A location context defines the location to use for a host and its associated resources.

For Web UI Users

The location menu is the second menu item in the menu bar, on the upper left of the Satellite web UI. If you have not selected a current location, the menu says Any Location. Click the Any location button and select the location to use.

For CLI Users

While using the CLI, include either --location "your_location_name" or --location-id "your_location_id" as an option. For example:

# hammer subscription list --location "Default_Location"

This command outputs subscriptions allocated for the Default_Location.

3.3. Deleting a Location

You can delete a location if the location is not associated with any life cycle environments or host groups. If there are any life cycle environments or host groups associated with the location you are about to delete, remove them by navigating to Administer > Locations and clicking the relevant location. It is not recommended to delete the default location created during installation because the default location is a placeholder for any unassociated hosts in the Satellite environment. There must be at least one location in the environment in any given time.

For Web UI Users

  1. Navigate to Administer > Locations.
  2. Select Delete from the list to the right of the name of the location you want to delete.
  3. Click OK to delete the location.

For CLI Users

Enter the following command to delete a location:

# hammer location delete --location "your_location_name"