Sebastian Baszcyj - 28.04.202020200428

How to change the hostname of the Ansible Tower Cluster

Not so long ago, I was asked to support a customer with their migration of the Red Hat Enterprise Linux systems from one domain to another. The request included changing the fully qualified domain name (FQDN) for each of the servers. It happened that this customer also had a few Ansible Tower Clusters. The Ansible Tower Cluster uses a few elements for the communication between the application nodes and for the communication with the postgresql database.

The following article provides a very short procedure on how to change the FQDN for the Ansible Tower Cluster nodes once the server has been migrated to a new domain.

Note: This procedure needs to be executed on each node of the cluster, excluding the postgresql database.

1. Log into the Ansible Tower using ssh with root privileges

2. Change directory to /etc/tower/conf.d

3. Edit file channels.py

4. Update the FQDN in the channels.py to reflect the new name of the server, for example from:

to:

5. Update the FQDN in the rabbitmq.py to reflect the new name of the server, for example from:

to:

6. Update the FQDNFFqdn in the postgres.py to reflect the new name of the server, for example from:

to:

7. Restart the Ansible Tower services and ensure all the services are ‘Active’

8. Navigate to Ansible Tower URL and ensure you can log in to the Ansible Tower UI.

9. Repeat the process on each cluster node

I hope this short procedure will be helpful!

Watch this space if you are interested in more Red Hat related ideas.

Join the Insentra Community with the Insentragram Newsletter

Hungry for more?