第 2 章 Installing Red Hat Ansible Automation Platform components on a single machine


You can install Red Hat Ansible Automation Platform components on a single machine in one of the following supported scenarios.

You can use these instructions to install a standalone instance of automation controller with a database on the same node, or a non-installer managed database. This scenario includes installation of automation controller, including the web frontend, REST API backend, and database on a single machine. It installs PostgreSQL, and configures the automation controller to use that as its database. This is considered the standard automation controller installation scenario.

2.1.1. Prerequisites

  • You chose and obtained a platform installer
  • You are installing on a machine that meets base system requirements.

You can use the Red Hat Ansible Automation Platform installer inventory file to specify your installation scenario.

注意
  • Using external databases: ensure the database sections of your inventory file are properly setup.
  • Add automation hub information in the [automationhub] group
  • automation hub and automation controller cannot be installed on the same node.
  • automation controller will not configure replication or failover for the database that it uses. automation controller should work with any replication you have.
  • The database server should be on the same network or in the same data center as the automation controller server for performance reasons.
  • For upgrading an existing cluster: When upgrading a cluster, you may decide that you want to also reconfigure your cluster to omit existing instances or instance groups. Omitting the instance or the instance group from the inventory file will not be enough to remove them from the cluster. In addition to omitting instances or instance groups from the inventory file, you must also deprovision instances or instance groups before starting the upgrade. Otherwise, omitted instances or instance groups will continue to communicate with the cluster, which can cause issues with tower services during the upgrade.
  • For clustered installations: If you are creating a clustered setup, you must replace localhost with the hostname or IP address of all instances. All nodes/instances must be able to reach any others using this hostname or address. In other words, you cannot use the localhost ansible_connection=local on one of the nodes AND all of the nodes should use the same format for the host names.
重要
  • Root access to remote machines is required. With Ansible, this can be achieved in different ways:
  • ansible_user=root ansible_ssh_pass=”your_password_here” inventory host or group variables
  • ansible_user=root ansible_ssh_private_key_file=”path_to_your_keyfile.pem” inventory host or group variables
  • ANSIBLE_BECOME_METHOD=’sudo’ ANSIBLE_BECOME=True ./setup.sh

For more information on become plugins, see Understanding privilege escalation.

Procedure

  1. Navigate to the installer

    1. [bundled installer]

      $ cd ansible-automation-platform-setup-bundle-<latest-version>
      Copy to Clipboard Toggle word wrap
    2. [online installer]

      $ cd ansible-automation-platform-setup-<latest-version>
      Copy to Clipboard Toggle word wrap
  2. Open the inventory file with a text editor.
  3. Edit inventory file parameters to specify your installation scenario. Follow the example below.

This example describes how you can populate the inventory file for a single node installation of automation controller.

重要

Do not use special characters for pg_password. It may cause the setup to fail.

[automationcontroller]
127.0.0.1 ansible_connection=local

[database]

[all:vars]
admin_password='password'

pg_host=''
pg_port=''

pg_database='awx'
pg_username='awx'
pg_password='password'
Copy to Clipboard Toggle word wrap

2.1.4. Flags and extra vars

You can pass flags and extra variables when installing automation controller.

:

Expand
表 2.1. Flags
ArgumentDescription

-h

Show this help message and exit

-i INVENTORY_FILE

Path to Ansible inventory file (default: inventory)

-e EXTRA_VARS

Set additional Ansible variables as key=value or YAML/JSON

-b

Perform a database backup in lieu of installing

-r

Perform a database restore in lieu of installing

-k

Generate and dsitribute a SECRET_KEY

Use the -- separator to add any Ansible arguments you wish to apply. For example: ./setup.sh -i my_awesome_inventory.yml -e matburt_is_country_gold=True — -K.

注意
  • When passing -r to perform a database restore default restore path is used unless EXTRA_VARS are provided with a non-default path. See the example below that passed an EXTRA_VAR specifying the restore path:

    ./setup.sh -e 'restore_backup_file=/path/to/nondefault/location' -r
    Copy to Clipboard Toggle word wrap
  • You can force an online installation by passing -e bundle_install=false:

    $ ./setup.sh -e bundle_install=false
    Copy to Clipboard Toggle word wrap
Expand
表 2.2. Extra variables
VariableDescriptionDefault

upgrade_ansible_with_tower

When installing automation controller make sure Ansible is also up to date

False

create_preload_data

When installing Tower also create the Demo Org, project, credential, Job Template, etc.

True

bundle_install_folder

When installing from a bundle where to put the bundled repos

var/lib/tower-bundle

nginx_disable_https

Disable HTTPS traffic through nginx, this is useful if offloading HTTPS to a load balancer

False

nginx_disable_hsts

Disable HSTS web-security policy mechanism

False

nginx_http_port

Port to configure nginx to listen to for HTTP

80

nginx_https_port

Port to configure nginx to listen to for HTTPS

443

backup_dir

A temp location to use when backing up

/var/backups/tower/

restore_backup_file

Specify an alternative backup file to restore from

None

required_ram

The minimum RAM required to install Tower (should only be changed for test installation)

3750

min_open_fds

The minimum open file descriptions (should only be changed for test installations)

None

ignore_preflight_errors

Ignore preflight checks, useful when installing into a template or other non-system image (overrides required_ram and min_open_fds)

False

Examples

  • To upgrade core:
./setup.sh -e upgrade_ansible_with_tower=1
Copy to Clipboard Toggle word wrap
  • To disable https handling at nginx:
./setup.sh -e nginx_disable_https=true
Copy to Clipboard Toggle word wrap
  • To specify a non-default path when restoring from a backup file:
./setup.sh -e 'restore_backup_file=/path/to/nondefault/location' -r
Copy to Clipboard Toggle word wrap

*

To override an inventory file used by passing it as an argument to the setup script:
Copy to Clipboard Toggle word wrap

You can run the setup script once you finish updating the inventory file with required parameters for installing your Private Automation Hub.

Procedure

  1. Run the setup.sh script

    $ ./setup.sh
    Copy to Clipboard Toggle word wrap

The installation will begin.

2.1.6. Verifying automation controller installation

Once the installation completes, you can verify your automation controller has been installed successfully by logging in with the admin credentials you inserted into the inventory file.

Procedure

  1. Navigate to the IP address specified for the automation controller node in the inventory file.
  2. Log in with the Admin credentials you set in the inventory file.
注意

The automation controller server is accessible from port 80 (https://<TOWER_SERVER_NAME>/) but will redirect to port 443 so 443 needs to be available also.

重要

If the installation fails and you are a customer who has purchased a valid license for Red Hat Ansible Automation Platform, please contact Ansible via the Red Hat Customer portal at https://access.redhat.com/.

Your automation controller is now ready for initial configuration.

返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat