Search

Chapter 4. Managing your Ansible automation controller subscription

download PDF

Before you can use automation controller, you must have a valid subscription, which authorizes its use.

4.1. Subscription Types

Red Hat Ansible Automation Platform is provided at various levels of support and number of machines as an annual subscription.

All subscription levels include regular updates and releases of automation controller, Ansible, and any other components of the Platform.

For more information, contact Ansible through the Red Hat Customer Portal or at http://www.ansible.com/contact-us/.

4.2. Obtaining an authorized Ansible automation controller subscription

If you already have a subscription to a Red Hat product, you can acquire an automation controller subscription through that subscription. If you do not have a subscription to Red Hat Ansible Automation Platform and Red Hat Satellite, you can request a trial subscription.

Procedure

  • If you have a Red Hat Ansible Automation Platform subscription, use your Red Hat customer credentials when you launch the automation controller to access your subscription information. See Importing a subscription.
  • If you have a non-Ansible Red Hat or Satellite subscription, access automation controller with one of these methods:

Additional resources

4.3. Obtaining a subscriptions manifest

To upload a subscriptions manifest, first set up your subscription allocations:

Procedure

  1. Navigate to https://access.redhat.com/management/subscription_allocations. The Subscriptions Allocations page contains no subscriptions until you create one.
  2. Click Create New subscription allocation.

    Note

    If Create New subscription allocation does not display, or is disabled, you do not have the proper permissions to create subscription allocations. To create a subscription allocation, you must either be an Administrator on the Customer Portal, or have the Manage Your Subscriptions role. Contact an access.redhat.com administrator, or organization administrator who can grant you permission to manage subscriptions.

  3. Enter a Name for your subscription and select 6.15 from the Type drop-down menu.

    Create a Subscriptions Allocation
  4. Click Create.

    When your subscriptions manifest is successfully created, the number indicated next to Entitlements indicates the number of entitlements associated with your subscription.

    Details of subscription allocations

4.3.1. Setting up a subscriptions manifest

To obtain a subscriptions manifest, you must add an entitlement to your subscriptions through the Subscriptions tab.

Procedure

  1. Click the Subscriptions tab.
  2. If there are no subscriptions to display, click Add Subscriptions.
  3. The following screen enables you to select and add entitlements to put in the manifest file.

    Ansible Automation Platform subscriptions

    You can select multiple Ansible Automation Platform subscriptions in your subscription allocation. Valid Ansible Automation Platform subscriptions commonly go by the name "Red Hat Ansible Automation…".

  4. Specify the number of entitlements or managed nodes to put in the manifest file. This enables you to split up a subscription, for example: 400 nodes on a development cluster and 600 nodes for the production cluster, out of a 1000 node subscription.

    Note

    You can apply multiple subscriptions to a single installation by adding multiple subscriptions of the same type to a manifest file and uploading them. Similarly, a subset of a subscription can be applied by only allocating a portion of the subscription when creating the manifest.

  5. Click Submit.

    The allocations you specified, when successfully added, are displayed in the Subscriptions tab.

  6. Click the Details tab to access the subscription manifest file.
  7. Click Export Manifest to export the manifest file for this subscription. A folder pre-pended with manifest_ is downloaded to your local drive. Multiple subscriptions with the same SKU are aggregated.
  8. When you have a subscription manifest, go to the Subscription screen.
  9. Click Browse to upload the entire manifest file.
  10. Navigate to the location where the file is saved. Do not open it or upload individual parts of it.

4.4. Importing a subscription

After you have obtained an authorized Ansible Automation Platform subscription, you must import it into the automation controller system before you can use automation controller. .Prerequisites

Procedure

  1. Launch automation controller for the first time. The Subscription Management screen displays.

    Subscription Management
  2. Retrieve and import your subscription by completing either of the following steps:

    1. If you have obtained a subscription manifest, upload it by navigating to the location where the file is saved. The subscription manifest is the complete .zip file, and not only its component parts.

      Note

      If the Browse option in the Subscription manifest option is disabled, clear the username and password fields to enable it.

      The subscription metadata is then retrieved from the RHSM/Satellite API, or from the manifest provided. If many subscription counts were applied in a single installation, automation controller combines the counts but uses the earliest expiration date as the expiry (at which point you must refresh your subscription).

    2. If you are using your Red Hat customer credentials, enter your username and password on the license page. Use your Satellite username or password if your automation controller cluster nodes are registered to Satellite with Subscription Manager. After you enter your credentials, click Get Subscriptions.

      Automation controller retrieves your configured subscription service. Then, it prompts you to select the subscription that you want to run and applies that metadata to automation controller. You can log in over time and retrieve new subscriptions if you have renewed.

  3. Click Next to proceed to the Tracking and Insights page.

    Tracking and insights collect data to help Red Hat improve the product and deliver a better user experience. For more information about data collection, see Usability Analytics and Data Collection of the Automation controller Administration Guide.

    This option is checked by default, but you can opt out of any of the following:

    • User analytics. Collects data from the controller UI.
    • Insights Analytics. Provides a high level analysis of your automation with automation controller. It helps you to identify trends and anomalous use of the controller. For opt-in of Automation Analytics to be effective, your instance of automation controller must be running on Red Hat Enterprise Linux. For more information, see the Automation Analytics section.

      Note

      You can change your analytics data collection preferences at any time.

  4. After you have specified your tracking and Insights preferences, click Next to proceed to the End User Agreement.
  5. Review and check the I agree to the End User License Agreement checkbox and click Submit.

    After your subscription is accepted, automation controller displays the subscription details and opens the Dashboard. To return to the Subscription settings screen from the Dashboard, select Settings Subscription settings from the Subscription option in the navigation panel.

  6. Optional: To return to the Subscription settings screen from the Dashboard, select Settings Subscription settings option in the navigation panel.

    Subscription Details

Troubleshooting your subscription

When your subscription expires (you can check this in the Subscription details of the Subscription settings window), you must renew it in automation controller. You can do this by either importing a new subscription, or setting up a new subscription.

If you meet the "Error fetching licenses" message, check that you have the proper permissions required for the Satellite user. The automation controller administrator requires this to apply a subscription.

The Satellite username and password is used to query the Satellite API for existing subscriptions. From the Satellite API, the automation controller receives metadata about those subscriptions, then filters through to find valid subscriptions that you can apply. These are then displayed as valid subscription options in the UI.

The following Satellite roles grant proper access:

  • Custom with view_subscriptions and view_organizations filter
  • Viewer
  • Administrator
  • Organization Administrator
  • Manager

Use the Custom role for your automation controller integration, as it is the most restrictive. For more information, see the Satellite documentation on managing users and roles.

Note

The System Administrator role is not equal to the Administrator user checkbox, and does not offer enough permissions to access the subscriptions API page.

4.5. Add a subscription manually

If you are unable to apply or update the subscription information by using the automation controller user interface, you can upload the subscriptions manifest manually in an Ansible playbook.

Use the license module in the ansible.controller collection:

- name: Set the license using a file
  license:
  manifest: "/tmp/my_manifest.zip"

For more information, see the Automation controller license module.

4.6. Attaching Subscriptions

You must have valid Ansible Automation Platform subscriptions attached before installing Ansible Automation Platform.

Note

Attaching subscriptions is unnecessary if your Red Hat account has enabled Simple Content Access Mode. However, you must register to Red Hat Subscription Management (RHSM) or Red Hat Satellite before installing Ansible Automation Platform.

Procedure

  1. To find the pool_id of your subscription, enter the following command:

    # subscription-manager list --available --all | grep "Ansible Automation Platform" -B 3 -A 6

    The command returns the following:

    Subscription Name: Red Hat Ansible Automation Platform, Premium (5000 Managed Nodes)
    Provides: Red Hat Ansible Engine
    Red Hat Single Sign-On
    Red Hat Ansible Automation Platform
    SKU: MCT3695
    Contract: ********
    Pool ID: ********************
    Provides Management: No
    Available: 4999
    Suggested: 1
  2. To attach this subscription, enter the following command:

    # subscription-manager attach --pool=<pool_id>

    If all nodes have attached, then the repositories are found.

  3. To check whether the subscription attached successfully, enter the following command:

    # subscription-manager list --consumed
  4. To remove this subscription, enter the following command:

    #subscription-manager remove --pool=<pool_id>

4.7. Troubleshooting: Keep your subscription in compliance

Your subscription has two possible statuses:

  • Compliant: Indicates that your subscription is appropriate for the number of hosts that you have automated within your subscription count.
  • Out of compliance: Indicates that you have exceeded the number of hosts in your subscription.

Compliance is computed as follows:

managed > manifest_limit    =>  non-compliant
managed =< manifest_limit   =>  compliant

Where: managed is the number of unique managed hosts without deletions, and manifest_limit is the number of managed hosts in the subscription manifest.

Other important information displayed are:

  • Hosts automated: Host count automated by the job, which consumes the license count.
  • Hosts imported: Host count considering unique host names across all inventory sources. This number does not impact hosts remaining.
  • Hosts remaining: Total host count minus hosts automated.
  • Hosts deleted: Hosts that were deleted, freeing the license capacity.
  • Active hosts previously deleted: Number of hosts now active that were previously deleted.

For example, if you have a subscription capacity of 10 hosts:

  • Starting with 9 hosts, 2 hosts were added and 3 hosts were deleted, you now have 8 hosts (compliant).
  • 3 hosts were automated again, now you have 11 hosts, which puts you over the subscription limit of 10 (non-compliant).
  • If you delete hosts, refresh the subscription details to see the change in count and status.

4.8. Viewing the host activity

Procedure

  1. In the navigation panel, select Host Metrics to view the activity associated with hosts, such as those that have been automated and deleted.

    Each unique hostname is listed and sorted by the user’s preference.

    Host metrics
    Note

    A scheduled task automatically updates these values on a weekly basis and deletes jobs with hosts that were last automated more than a year ago.

  2. Delete unnecessary hosts directly from the Host Metrics view by selecting the desired hosts and clicking Delete.

    These are soft-deleted, meaning their records are not removed, but are not being used and thereby not counted towards your subscription.

4.9. Host metric utilities

Automation controller provides a way to generate a CSV output of the host metric data and host metric summary through the Command Line Interface (CLI). You can also soft delete hosts in bulk through the API.

4.9.1. awx-manage utility

The awx-manage utility supports the following options:

awx-manage host_metric --csv

This command produces host metric data, a host metrics summary file, and a cluster info file. To package all the files into a single tarball for distribution and sharing use:

awx-manage host_metric --tarball

To specify the number of rows (<n>) to output to each file:

awx-manage host_metric --tarball --rows_per_file <n>

The following is an example of a configuration file:

Configuration file

Automation Analytics receives and uses the JSON file.

4.9.2. API endpoint functions

The API lists only non-deleted records and are sortable by last_automation and used_in_inventories columns.

You can use the host metric API endpoint,api/v2/host_metric to soft delete hosts:

api/v2/host_metric <n> DELETE

A monthly scheduled task automatically deletes jobs that uses hosts from the Host Metric table that were last automated more than a year ago.

Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.