Configure proxy servers for egress traffic
You can deploy Ansible Automation Platform so that egress from the platform for various purposes functions properly through proxy servers.
Egress proxy allows clients to make indirect (through a proxy server) requests to network services.
The client first connects to the proxy server and requests some resource, for example, email, located on another server. The proxy server then connects to the specified server and retrieves the resource from it.
Overview Copy linkLink copied!
The egress proxy should be configured on the system and component level of Ansible Automation Platform, for all the RPM and containerized installation methods. For containerized installers, the system proxy configuration for Podman on the nodes solves most of the problems with access through the proxy. For RPM installation, both system and component configurations are needed.
Proxy backends Copy linkLink copied!
For HTTP and HTTPS proxies you can use a squid server. Squid is a forward proxy for the Web supporting HTTP, HTTPS, and FTP, reducing bandwidth and improving response times by caching and reusing frequently-requested web pages. It is licensed under the GNU GPL.
Forward proxies are systems that intercept network traffic going to another network (typically the internet) and send it on the behalf of the internal systems. The squid proxy enables all required communication to pass through it.
Make sure all the required Ansible Automation Platform control plane ports are opened on the squid proxy backend. Ansible Automation Platform-specific ports:
acl Safe_ports port 81
acl Safe_ports port 82
acl Safe_ports port 389
acl Safe_ports port 444
acl Safe_ports port 445
acl SSL_ports port 22
The following ports are for containerized installations:
acl SSL_ports port 444
acl SSL_ports port 445
acl SSL_ports port 8443
acl SSL_ports port 8444
acl SSL_ports port 8445
acl SSL_ports port 8446
acl SSL_ports port 44321
acl SSL_ports port 44322
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
Configure the system-level outbound proxy Copy linkLink copied!
An outbound proxy (egress proxy) is a server that acts as an intermediary for requests from clients seeking resources from other servers on the internet. It is used to regulate and secure client traffic, and to provide caching services to improve performance.
The outbound proxy is configured on the system level for all the nodes in the control plane.
You must set the following environment variables:
http_proxy=“http://external-proxy_0:3128”
https_proxy=“http://external-proxy_0:3128”
no_proxy=“localhost,127.0.0.0/8,10.0.0.0/8”
You can also add those variables to the '/etc/environment' file to make them permanent.
The installation program ensures that all external communication during the installation goes through the proxy. For containerized installation, those variables ensure that Podman uses the egress proxy.
Configure component-level proxy settings Copy linkLink copied!
After using the RPM installation program, you must configure automation controller to use egress proxy.
About this task Copy linkLink copied!
This is not required for containerized installers because Podman uses system configured proxy and redirects all the container traffic to the proxy.
For automation controller, set the AWX_TASK_ENV variable in /api/v2/settings/. To do this through the UI use the following procedure:
Procedure Copy linkLink copied!
Configure project syncing using SSH to work with a proxy server Copy linkLink copied!
The following procedure for RPM-based Ansible Automation Platform describes how to use automation controller Project Sync by using the SSH protocol to work with a proxy server.
Procedure Copy linkLink copied!
Enable a configurable proxy environment for AWS inventory synchronization Copy linkLink copied!
To enable a configurable proxy environment for AWS inventory synchronization, you can manually edit the override configuration file or set the configuration in the platform UI:
About this task Copy linkLink copied!
- Manually edit
/usr/lib/systemd/system/receptor.service.d/override.confand add the followinghttp_proxyenvironment variables there:http_proxy:<value> https_proxy:<value> proxy_username:<value> Proxy_password:<value>Or
- To do this through the UI use the following procedure:
Procedure Copy linkLink copied!
Configure the private automation hub community remote Copy linkLink copied!
Configure the community remote so you can sync content from Ansible Galaxy.
Before you begin Copy linkLink copied!
- You have a
requirements.ymlfile that identifies those collections to synchronize from Ansible Galaxy as in the following example:Requirements.yml example
collections:
# Install a collection from Ansible Galaxy.
- name: community.aws
version: 5.2.0
source: https://galaxy.ansible.com
About this task Copy linkLink copied!
You can edit the community remote repository to synchronize chosen collections from Ansible Galaxy to your private automation hub. By default, your private automation hub community repository directs to galaxy.ansible.com/api/.
Procedure Copy linkLink copied!
- Log in to Ansible Automation Platform.
- From the navigation panel, select .
- In the Details tab in the Community remote, click .
- In the YAML requirements field, paste the contents of your
requirements.ymlfile. - Click .
Results Copy linkLink copied!
You can now synchronize collections identified in your requirements.yml file from Ansible Galaxy to your private automation hub.
What to do next Copy linkLink copied!
See Synchronizing content collectionsfor syncing steps.