Use the ansible-tower-service stop command to stop the Ansible services and then use the ansible-tower-service status command to ensure the services have been stopped.
ansible-tower-service stop
. . .
Stopping Tower
Redirecting to /bin/systemctl stop rh-postgresql10-postgresql.service
Redirecting to /bin/systemctl stop rabbitmq-server.service
Redirecting to /bin/systemctl stop nginx.service
Redirecting to /bin/systemctl stop supervisord.service
Create a tar archive of the /etc/ansible and /etc/tower directories.
tar -cf ansible.tar /etc/ansible
tar -cf tower.tar /etc/tower
Additionally, assuming you ran setup.sh to install Ansible Tower, the following command can be run to backup Ansible Tower. Then, if you choose to reinstall Ansible Tower, the setup.sh -r <backup file> command can be used.
setup.sh -b
Use the yum remove command to uninstall the Ansible, RabbitMQ and Python packages.
yum remove ansible-tower\*
yum remove rabbitmq-server
yum remove rh-python36-*
Remove the Postgres script.
rm /etc/profile.d/rh-postgresql10-env.sh
Remove the following directories.
rm -rf /etc/ansible
rm -rf /etc/tower
rm -rf /var/lib/pgsql
rm -rf /var/lib/awx
rm -rf /var/lib/rabbitmq
rm -rf /var/opt/rh/rh-postgresql10/lib/pgsql/data
Use the yum clean command to clean the Ansible Tower repos.
yum clean metadata --enablerepo="ansible-tower,ansible-tower-dependencies"
Ensure the rpm command returns no standard out.
rpm -qa | grep ansible-tower
Did you find this article helpful?
If so, consider buying me a coffee over at