Red Hat Ansible Automation Platform Operations Guide
This document provides instructions and guidance on post installation activities for Red Hat Ansible Automation Platform.
Abstract
Preface
After installing Red Hat Ansible Automation Platform, your system might need extra configuration to ensure your deployment runs smoothly. This guide provides procedures for configuration tasks that you can perform after installing Red Hat Ansible Automation Platform.
Making open source more inclusive
Red Hat is committed to replacing problematic language in our code, documentation, and web properties. We are beginning with these four terms: master, slave, blacklist, and whitelist. Because of the enormity of this endeavor, these changes will be implemented gradually over several upcoming releases. For more details, see our CTO Chris Wright’s message.
Chapter 1. Activating Red Hat Ansible Automation Platform
Red Hat Ansible Automation Platform uses available subscriptions or a subscription manifest to authorize the use of Ansible Automation Platform. To obtain a subscription, you can do either of the following:
- Use your Red Hat customer or Satellite credentials when you launch Ansible Automation Platform.
- Upload a subscriptions manifest file either using the Red Hat Ansible Automation Platform interface or manually in an Ansible playbook.
1.1. Activate with credentials
When Ansible Automation Platform launches for the first time, the Ansible Automation Platform Subscription screen automatically displays. You can use your Red Hat credentials to retrieve and import your subscription directly into Ansible Automation Platform.
Procedures
- Enter your Red Hat username and password.
Click
.NoteYou can also use your Satellite username and password if your cluster nodes are registered to Satellite through Subscription Manager.
- Review the End User License Agreement and select I agree to the End User License Agreement.
- The Tracking and Analytics options are checked by default. These selections help Red Hat improve the product by delivering you a much better user experience. You can opt out by deselecting the options.
- Click .
- Once your subscription has been accepted, the license screen displays and navigates you to the Dashboard of the Ansible Automation Platform interface. You can return to the license screen by clicking the ⚙ and selecting the License tab from the Settings screen. icon
1.2. Activate with a manifest file
If you have a subscriptions manifest, you can upload the manifest file either using the Red Hat Ansible Automation Platform interface or manually in an Ansible playbook.
Prerequisites
You must have a Red Hat Subscription Manifest file exported from the Red Hat Customer Portal. For more information, see Obtaining a manifest file.
Uploading with the interface
- Complete steps to generate and download the manifest file
- Log in to Red Hat Ansible Automation Platform.
- If you are not immediately prompted for a manifest file, go to → .
- Make sure the Username and Password fields are empty.
- Click and select the manifest file.
- Click .
If the USERNAME and PASSWORD fields.
button is disabled on the License page, clear theUploading manually
If you are unable to apply or update the subscription info using the Red Hat Ansible Automation Platform interface, you can upload the subscriptions manifest manually in an Ansible playbook using the license
module in the ansible.controller
collection.
- name: Set the license using a file license: manifest: "/tmp/my_manifest.zip"
Chapter 2. Obtaining a manifest file
You can obtain a subscription manifest in the Subscription Allocations section of Red Hat Subscription Management. After you obtain a subscription allocation, you can download its manifest file and upload it to activate Ansible Automation Platform.
To begin, login to the Red Hat Customer Portal using your administrator user account and follow the procedures in this section.
2.1. Create a subscription allocation
Creating a new subscription allocation allows you to set aside subscriptions and entitlements for a system that is currently offline or air-gapped. This is necessary before you can download its manifest and upload it to Ansible Automation Platform.
Procedure
- From the Subscription Allocations page, click .
- Enter a name for the allocation so that you can find it later.
- Select Type: Satellite 6.8 as the management application.
- Click .
2.2. Adding subscriptions to a subscription allocation
Once an allocation is created, you can add the subscriptions you need for Ansible Automation Platform to run properly. This step is necessary before you can download the manifest and add it to Ansible Automation Platform.
Procedure
- From the Subscription Allocations page, click on the name of the Subscription Allocation to which you would like to add a subscription.
- Click the Subscriptions tab.
- Click .
- Enter the number of Ansible Automation Platform Entitlement(s) you plan to add.
- Click .
Verification
After your subscription has been accepted, subscription details are displayed. A status of Compliant indicates your subscription is in compliance with the number of hosts you have automated within your subscription count. Otherwise, your status will show as Out of Compliance, indicating you have exceeded the number of hosts in your subscription.
Other important information displayed include the following:
- Hosts automated
- Host count automated by the job, which consumes the license count
- Hosts imported
- Host count considering all inventory sources (does not impact hosts remaining)
- Hosts remaining
- Total host count minus hosts automated
2.3. Downloading a manifest file
After an allocation is created and has the appropriate subscriptions on it, you can download the manifest from Red Hat Subscription Management.
Procedure
- From the Subscription Allocations page, click on the name of the Subscription Allocation to which you would like to generate a manifest.
- Click the Subscriptions tab.
- Click to download the manifest file.
The file is saved to your default downloads folder and can now be uploaded to activate Red Hat Ansible Automation Platform.
Chapter 3. Configuring proxy support for Red Hat Ansible Automation Platform
You can configure Red Hat Ansible Automation Platform to communicate with traffic using a proxy. Proxy servers act as an intermediary for requests from clients seeking resources from other servers. A client connects to the proxy server, requesting some service or available resource from a different server, and the proxy server evaluates the request as a way to simplify and control its complexity. The following sections describe the supported proxy configurations and how to set them up.
3.1. Enable proxy support
To provide proxy server support, automation controller handles proxied requests (such as ALB, NLB , HAProxy, Squid, Nginx and tinyproxy in front of automation controller) via the REMOTE_HOST_HEADERS list variable in the automation controller settings. By default, REMOTE_HOST_HEADERS is set to ["REMOTE_ADDR", "REMOTE_HOST"]
.
To enable proxy server support, edit the REMOTE_HOST_HEADERS field in the settings page for your automation controller:
Procedure
- On your automation controller, navigate to → .
In the REMOTE_HOST_HEADERS field, enter the following values:
[ "HTTP_X_FORWARDED_FOR", "REMOTE_ADDR", "REMOTE_HOST" ]
Automation controller determines the remote host’s IP address by searching through the list of headers in REMOTE_HOST_HEADERS until the first IP address is located.
3.2. Known proxies
When automation controller is configured with REMOTE_HOST_HEADERS = ['HTTP_X_FORWARDED_FOR', 'REMOTE_ADDR', 'REMOTE_HOST']
, it assumes that the value of X-Forwarded-For
has originated from the proxy/load balancer sitting in front of automation controller. If automation controller is reachable without use of the proxy/load balancer, or if the proxy does not validate the header, the value of X-Forwarded-For
can be falsified to fake the originating IP addresses. Using HTTP_X_FORWARDED_FOR
in the REMOTE_HOST_HEADERS
setting poses a vulnerability.
To avoid this, you can configure a list of known proxies that are allowed using the PROXY_IP_ALLOWED_LIST field in the settings menu on your automation controller. Load balancers and hosts that are not on the known proxies list will result in a rejected request.
3.2.1. Configuring known proxies
To configure a list of known proxies for your automation controller, add the proxy IP addresses to the PROXY_IP_ALLOWED_LIST field in the settings page for your automation controller.
Procedure
- On your automation controller, navigate to → .
In the PROXY_IP_ALLOWED_LIST field, enter IP addresses that are allowed to connect to your automation controller, following the syntax in the example below:
Example PROXY_IP_ALLOWED_LIST entry
[ "example1.proxy.com:8080", "example2.proxy.com:8080" ]
-
PROXY_IP_ALLOWED_LIST
requires proxies in the list are properly sanitizing header input and correctly setting anX-Forwarded-For
value equal to the real source IP of the client. Automation controller can rely on the IP addresses and hostnames inPROXY_IP_ALLOWED_LIST
to provide non-spoofed values for theX-Forwarded-For
field. Do not configure
HTTP_X_FORWARDED_FOR
as an item in `REMOTE_HOST_HEADERS`unless all of the following conditions are satisfied:- You are using a proxied environment with ssl termination;
-
The proxy provides sanitization or validation of the
X-Forwarded-For
header to prevent client spoofing; -
/etc/tower/conf.d/remote_host_headers.py
definesPROXY_IP_ALLOWED_LIST
that contains only the originating IP addresses of trusted proxies or load balancers.
3.3. Configuring a reverse proxy
You can support a reverse proxy server configuration by adding HTTP_X_FORWARDED_FOR
to the REMOTE_HOST_HEADERS field in your automation controller settings. The X-Forwarded-For
(XFF) HTTP header field identifies the originating IP address of a client connecting to a web server through an HTTP proxy or load balancer.
Procedure
- On your automation controller, navigate to → .
In the REMOTE_HOST_HEADERS field, enter the following values:
[ "HTTP_X_FORWARDED_FOR", "REMOTE_ADDR", "REMOTE_HOST" ]
3.4. Enable sticky sessions
By default, an Application Load Balancer routes each request independently to a registered target based on the chosen load-balancing algorithm. To avoid authentication errors when running multiple instances of automation hub behind a load balancer, you must enable sticky sessions. Enabling sticky sessions sets a custom application cookie that matches the cookie configured on the load balancer to enable stickiness. This custom cookie can include any of the cookie attributes required by the application.
Additional resources
- Refer to Sticky sessions for your Application Load Balancer for more information about enabling sticky sessions.
Disclaimer: Links contained in this note to external website(s) are provided for convenience only. Red Hat has not reviewed the links and is not responsible for the content or its availability. The inclusion of any link to an external website does not imply endorsement by Red Hat of the website or their entities, products or services. You agree that Red Hat is not responsible or liable for any loss or expenses that may result due to your use of (or reliance on) the external site or content.
Chapter 4. Configuring automation controller websocket connections
You can configure automation controller in order to align the websocket configuration with your nginx or load balancer configuration.
4.1. Websocket configuration for automation controller
Automation controller nodes are interconnected through websockets to distribute all websocket-emitted messages throughout your system. This configuration setup enables any browser client websocket to subscribe to any job that might be running on any automation controller node. Websocket clients are not routed to specific automation controller nodes. Instead, any automation controller node can handle any websocket request and each automation controller node must know about all websocket messages destined for all clients.
You can configure websockets at /etc/tower/conf.d/websocket_config.py
in all of your automation controller nodes and the changes will be effective after the service restarts.
Automation controller automatically handles discovery of other automation controller nodes through the Instance record in the database.
Your automation controller nodes are designed to broadcast websocket traffic across a private, trusted subnet (and not the open Internet). Therefore, if you turn off HTTPS for websocket broadcasting, the websocket traffic, composed mostly of Ansible playbook stdout, is sent unencrypted between automation controller nodes.
4.1.1. Configuring automatic discovery of other automation controller nodes
You can configure websocket connections to enable automation controller to automatically handle discovery of other automation controller nodes through the Instance record in the database.
Edit automation controller websocket information for port and protocol, and confirm whether to verify certificates with
True
orFalse
when establishing the websocket connections:BROADCAST_WEBSOCKET_PROTOCOL = 'http' BROADCAST_WEBSOCKET_PORT = 80 BROADCAST_WEBSOCKET_VERIFY_CERT = False
Restart automation controller with the following command:
$ automation-controller-service restart
Chapter 5. Managing usability analytics and data collection from automation controller
You can change how you participate in usability analytics and data collection from automation controller by opting out or changing your settings in the automation controller user interface.
5.1. Usability analytics and data collection
Usability data collection is included with automation controller to collect data to better understand how automation controller users specifically interact with automation controller, to help enhance future releases, and to continue streamlining your user experience.
Only users installing a trial of automation controller or a fresh installation of automation controller are opted-in for this data collection.
Additional resources
- For more information, see the Red Hat privacy policy.
5.1.1. Controlling data collection from automation controller
You can control how automation controller collects data by setting your participation level in the User Interface tab in the Settings menu.
Procedure
- Log in to your automation controller.
- Navigate to → .
Select the desired level of data collection from the User Analytics Tracking State drop-down list:
- Off: Prevents any data collection.
- Anonymous: Enables data collection without your specific user data.
- Detailed: Enables data collection including your specific user data.
- Click to apply the settings or to discard the changes.
Chapter 6. Renewing and changing the SSL certificate
If your current SSL certificate has expired or will expire soon, you can either renew or replace the SSL certificate used by Ansible Automation Platform.
You must renew the SSL certificate if you need to regenerate the SSL certificate with new information such as new hosts.
You must replace the SSL certificate if you want to use an SSL certificate signed by an internal certificate authority.
6.1. Renewing the self-signed SSL certificate
The following steps regenerate a new SSL certificate for both automation controller and automation hub.
Procedure
Add
aap_service_regen_cert=true
to the inventory file in the[all:vars]
section:[all:vars] aap_service_regen_cert=true
- Run the installer.
6.2. Changing SSL certificates
To change the SSL certificate, you can edit the inventory file and run the installer. The installer verifies that all Ansible Automation Platform components are working. The installer can take a long time to run.
Alternatively, you can change the SSL certificates manually. This is quicker, but there is no automatic verification.
Red Hat recommends that you use the installer to make changes to your Ansible Automation Platform instance.
6.2.1. Prerequisites
- If there is an intermediate certificate authority, you must append it to the server certificate.
- Both automation controller and automation hub use NGINX so the server certificate must be in PEM format.
- Use the correct order for the certificates: The server certificate comes first, followed by the intermediate certificate authority.
For further information, see the ssl certificate section of the NGINX documentation.
6.2.2. Changing the SSL certificate and key using the installer
The following procedure describes how to change the SSL certificate and key in the inventory file.
Procedure
- Copy the new SSL certificates and keys to a path relative to the Ansible Automation Platform installer.
Add the absolute paths of the SSL certificates and keys to the inventory file. Refer to the Automation controller variables and Automation hub variables sections of the Red Hat Ansible Automation Platform Installation Guide for guidance on setting these variables.
-
Automation controller:
web_server_ssl_cert
,web_server_ssl_key
,custom_ca_cert
-
Automation hub:
automationhub_ssl_cert
,automationhub_ssl_key
,custom_ca_cert
NoteThe
custom_ca_cert
must be the root certificate authority that signed the intermediate certificate authority. This file is installed in/etc/pki/ca-trust/source/anchors
.-
Automation controller:
- Run the installer.
6.2.3. Changing the SSL certificate manually
6.2.3.1. Changing the SSL certificate and key manually on automation controller
The following procedure describes how to change the SSL certificate and key manually on Automation Controller.
Procedure
Backup the current SSL certificate:
cp /etc/tower/tower.cert /etc/tower/tower.cert-$(date +%F)
Backup the current key files:
cp /etc/tower/tower.key /etc/tower/tower.key-$(date +%F)+
-
Copy the new SSL certificate to
/etc/tower/tower.cert
. -
Copy the new key to
/etc/tower/tower.key
. Restore the SELinux context:
restorecon -v /etc/tower/tower.cert /etc/tower/tower.key
Set appropriate permissions for the certificate and key files:
chown root:awx /etc/tower/tower.cert /etc/tower/tower.key chmod 0600 /etc/tower/tower.cert /etc/tower/tower.key
Test the NGINX configuration:
nginx -t
Reload NGINX:
systemctl reload nginx.service
Verify that new SSL certificate and key have been installed:
true | openssl s_client -showcerts -connect ${CONTROLLER_FQDN}:443
6.2.3.2. Changing the SSL certificate and key on automation controller on OpenShift Container Platform
The following procedure describes how to change the SSL certificate and key for automation controller running on OpenShift Container Platform.
Procedure
- Copy the signed SSL certificate and key to a secure location.
Create a TLS secret within OpenShift:
oc create secret tls ${CONTROLLER_INSTANCE}-certs-$(date +%F) --cert=/path/to/ssl.crt --key=/path/to/ssl.key
Modify the automation controller custom resource to add
route_tls_secret
and the name of the new secret to the spec section.oc edit automationcontroller/${CONTROLLER_INSTANCE}
... spec: route_tls_secret: automation-controller-certs-2023-04-06 ...
The name of the TLS secret is arbitrary. In this example, it is timestamped with the date that the secret is created, to differentiate it from other TLS secrets applied to the automation controller instance.
- Wait a few minutes for the changes to be applied.
Verify that new SSL certificate and key have been installed:
true | openssl s_client -showcerts -connect ${CONTROLLER_FQDN}:443
6.2.3.3. Changing the SSL certificate and key manually on automation hub
The following procedure describes how to change the SSL certificate and key manually on automation hub.
Procedure
Backup the current SSL certificate:
cp /etc/pulp/certs/pulp_webserver.crt /etc/pulp/certs/pulp_webserver.crt-$(date +%F)
Backup the current key files:
cp /etc/pulp/certs/pulp_webserver.key /etc/pulp/certs/pulp_webserver.key-$(date +%F)
-
Copy the new SSL certificate to
/etc/pulp/certs/pulp_webserver.crt
. -
Copy the new key to
/etc/pulp/certs/pulp_webserver.key
. Restore the SELinux context:
restorecon -v /etc/pulp/certs/pulp_webserver.crt /etc/pulp/certs/pulp_webserver.key
Set appropriate permissions for the certificate and key files:
chown root:pulp /etc/pulp/certs/pulp_webserver.crt /etc/pulp/certs/pulp_webserver.key
chmod 0600 /etc/pulp/certs/pulp_webserver.crt /etc/pulp/certs/pulp_webserver.key
Test the NGINX configuration:
nginx -t
Reload NGINX:
systemctl reload nginx.service
Verify that new SSL certificate and key have been installed:
true | openssl s_client -showcerts -connect ${CONTROLLER_FQDN}:443