
April 27, 2022
A couple of years back, I wrote a blogpost on obtaining the previous Job ID in Ansible Tower workflow.
Now, let’s go further and create another module to obtain the output of such a job.
Before moving further, I want to specify that I talk about Ansible Tower since this is the most known name for this software, but I could also be talking about AWX or Ansible Controller since those are the same codebase.
AWX is the open-source upstream project.
Ansible Tower is the former name of the Red Hat product based on AWX.
Ansible Controller is the name of the Red Hat Ansible Automation Platform 2 component based on AWX.
Read More 
November 15, 2020
Ansible Tower allows you to create Workflows, which enable you to create complex workflows by putting together multiple Ansible Playbooks.
Ansible Tower Workflows can have some simple logics, such as run different Ansible Playbooks based on the outcome (success or failure) of a previous Ansible Playbook run.
Sometimes, though, you need to have more information about a previous Ansible Playbook run than just the outcome.
I recently found myself in a situation where I had an Ansible Tower Workflow with two Ansible Playbooks into it, where the first one was performing specific tasks.
The second one needed to get and process the output of the first Ansible Playbook.
Since Ansible Tower provides an API to fetch an Ansible Playbook run output, this part is trivial if you know the Job ID that Ansible Tower assigned to that specific run.
Looking around, I’ve not found much information on how to retrieve the Job ID of a different Job, so I looked at the various APIs and found this solution, which I’m going to share with you today.
I’ve not found much information about getting another Job ID because it is usually a bad practice to do such a thing and that very often you can achieve the same goal in a much cleaner way.
This better option, though, was not present in my case.
Due to many constraints I had in this project, this was the best way I’ve found, even if I’ve tried - at least mentally - many other ways before accepting that this was the only one in my case.
Read More 
October 6, 2017
One of the big advantages that Ansible Tower and AWX (the open source and upstream version of Ansible Tower) bring to the table is the Role Base Access Control (RBAC).
This will allow you to select which users (or teams) will be able to see which objects in Ansible Tower as well as which jobs they will be able to run.
Obviously to leverage the RBAC, you will have to have personal accounts for every user of your platform.
Now, this can be very complex to do when you have hundreds of users, if you consider than you should then manage those users.
Also, you probably already have those information in your company LDAP or Active Directory.
Read More 
September 7, 2017
In October 2015, Red Hat bought Ansible Inc.
As far as I know, in the acquisition, two close source components got acquired by Red Hat: Ansible Tower and Ansible Galaxy.
Since the day of the acquisition, Red Hat has been very clear on the fact that those two components would have become open source at a certain point, even if there was not a public date or timeline yet.
Making a codebase open source is not always easy and quick process.
A lot of times many aspects need attention, from a legal review of the commits to a security audit of the code.
Read More 
August 18, 2017
Around one year ago, I did a post around Ansible Tower High Availability maintenance, but in the mean time many things changed and that post is not up to date anymore, so I decided to create a new one that covers the same topic but for Ansible Tower 3.1.
From Ansible Tower 3.1 we lost the distinction of Primary Ansible Tower and Secondary Ansible Tower.
That concept was related to the fact that the Secondary Ansible Towers were in a hot-standby mode.
Since Ansible Tower 3.1, we have active-active clustering and therefore all Ansible Towers in your cluster are always active and there is no distinction between them.
Read More 
July 26, 2017
A lot of times during my job I found myself with the need of Ansible Tower testing environments.
In the last few weeks I created a Vagrant script to actually automate it.
As this is a single host installation, which is usually more than enough for the majority of tests I do, the Vagrant file is very easy:
Vagrant.configure(2) do |config|
# Set machine size
config.vm.provider :libvirt do |domain|
domain.memory = 2048
domain.cpus = 1
end
# Tower/PgSQL machine
config.vm.define "tower" do |tower|
tower.vm.box = "centos/7"
end
# Ansible Tower configuration
config.vm.provision "ansible" do |ansible|
ansible.playbook = "playbook.yaml"
end
end
I basically create a 2Gb of RAM machine leveraging libvirt and run an Ansible Playbook on it.
The reason I created a 2Gb of RAM machine and I’ve not tried to shrink it further is because the Ansible Tower installation checks for 2Gb of RAM, and I wanted to create something easy.
I’m sure I could patch the installer to accept a 1Gb machine, but it’s not worth the effort to me. Also, in my usual usage of the computer I rarely go below 11Gb free memory, so I’m not too concerned in giving 2Gb to my VM.
Read More 
May 31, 2017
Ansible Tower 3.1 has recently been released, and it does implement real HA.
In fact, up to version 3.0, Ansible Tower multi-node installation, only allowed a single machine to be primary and the switch was not possible in an automated fashion, so if the primary Ansible Tower would have collapsed, an operator should have promoted one of the secondary Ansible Tower to be primary to be able to carry on the work.
With Ansible Tower 3.1 this is no longer the case, since all Ansible Tower machines are active all the time.
Read More 
September 28, 2016
IMPORTANT NOTICE: This article deals with Ansible Tower <= 3.0. If you are looking for information around Ansible Tower >= 3.1, please look my newer article on the topic.
In the last few months I’ve setted up multiple times Ansible Tower, but I’ve noticed that there is not much documentation on how to perform basic maintenance on Ansible Tower High Availability setup, so I decided to write an article about it.
Read More