Upgrading Ansible Tower

There was a new shiny Ansible Tower dropped this week More Details Here. So I decided to Upgrade my Ansible Tower Installation to 3.4.

Upgrading Ansible Tower can vary depending on how you have your Ansible Tower Setup. For the Purpose of this Post, I will talk about a single Machine setup only. If you want more info on upgrading Highly Available Tower Install or Installs where the Database is on a different node. Please Read thru the Upgrade Guide Here.

So let us start the Upgrade Process We start with Downloading the latest Ansible Tower tarball. Now A couple of notes I am on Tower 3.3 so my installation already has a Postgres Database vs MongoDB which were there in previous versions of Ansible Tower so if you are upgrading from a version before Tower 3.0 follow the Upgrade guide to move to 3.0 First.

curl -O https://releases.ansible.com/ansible-tower/setup/ansible-tower-setup-latest.tar.gz

Once the Software is Downloaded. untar the software

[root@fuad-tower tmp]# tar xvzf ansible-tower-setup-latest.tar.gz
[root@fuad-tower tmp]# cd ansible-tower-setup-3.4.0-2

Now the first thing we need to do is build an inventory file or access the inventory file we created at setup . I like ot back that up in a seperate location but always compare and ensure all password fields etc are completed in order to complete the upgrade since the inventory file might have thing like new components added to it. The First thing we will do is backup everything.

./setup .sh -b # Backup the Existing Installation

you will see lots of messages like these

TASK [backup : Get tower database settings] *****************************************************************
ok: [localhost] => {“censored”: “the output has been hidden due to the fact that ‘no_log: true’ was specified for this result”, “changed”: false}
TASK [backup : Ingest tower database settings] **************************************************************
ok: [localhost] => {“censored”: “the output has been hidden due to the fact that ‘no_log: true’ was specified for this result”, “changed”: false}
TASK [backup : Perform a PostgreSQL dump.] ******************************************************************
changed: [localhost] => {“censored”: “the output has been hidden due to the fact that ‘no_log: true’ was specified for this result”, “changed”: true}
PLAY RECAP **************************************************************************************************
localhost : ok=33 changed=25 unreachable=0 failed=0
The setup process completed successfully.
Setup log saved to /var/log/tower/setup-2019-01-13-12:24:50.log

Once you have taken a backup we will now run the setup.sh to execute the upgrade. It will automatically detect that there is an installation and upgrade your Ansible Tower Installation.

root@fuad-tower ansible-tower-setup-3.4.0-2]# ./setup.sh

The Process will run thru Check tasks, PreFlight Tasks and then Install Tasks to upgrade the install.

PLAY RECAP **************************************************************************************************
localhost : ok=142 changed=34 unreachable=0 failed=0
The setup process completed successfully.
Setup log saved to /var/log/tower/setup-2019-01-13-12:33:42.log

The End Result is an upgraded Ansible Tower Install

Hope this Helps for Folks that want to upgrade their Ansible Tower Instances.