Ansible Automation Platform 2.x Standalone with internal database Installation Failure

Solution Verified - Updated -

Environment

  • Ansible Automation Platform 2.x
  • Red Hat Enterprise Linux 8.2+

Issue

  • Standalone automation controller with internal database installation failed due to the following error:
TASK [ansible.automation_platform_installer.preflight : Ensure hostname on nodes with receptor installed is not localhost] ***
fatal: [aap]: FAILED! => {"changed": false, "msg": "The system hostname cannot be localhost, receptor requires it to be set to something other than localhost"}

Resolution

  • Make sure the [automationcontroller] section in the inventory file is set correctly to point to the fully qualified domain name or IP address of the server as follows:
[automationcontroller]
controller.example.com

If not, please provide the fully qualified domain name or IP address of the controller host.

  • Make sure the host name of the controller server is set correctly in host file
$ cat /etc/hosts

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.52.xxx controller.example.com

If not set, please provide the fully qualified domain name and IP address of the host in hostfile.

  • Finally, make sure the host name is correctly set on the server
$ hostname

If the result is not correct, set the hostname using the following steps:

  1. Set the correct hostname
$ sudo hostnamectl set-hostname controller.example.com
  1. Reboot the controller server
$ sudo reboot
  1. Confirm the hostname is correct now
$ hostname

Root Cause

On a freshly installed server, sometimes the hostname is set as localhost due to which the installation script of standalone automation controller with internal database installation fails in preflight check of the server name.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments