Using the ServiceNow Ansible Spoke

Nearly four years ago, I wrote a post a on how to configure ServiceNow to call the Ansible Automation platform . In that post, I made use of outbound REST API calls in ServiceNow along with worfklows. The ServiceNow Ansible Spoke gives customers another method for integrating ServiceNow with Ansible Automation Platform. The Ansible Spoke provides some out of the box integrations with automation controller (formally Ansible Tower) to streamline the integration process. [Read More]

A journey with Ansible 2.12, implicit localhost and python discovery

I recently upgraded to Ansible 2.12 and a couple of my playbooks stopped working. This seems to be down to a change in python discovery and if you have made the same mistakes as me, you’ll hit a similar issue. I thought I would write up my findings in case it helps anyone else. HINT you’ve probably got an entry for localhost in your inventory!! Everything was working in Ansible 2. [Read More]

ansible-builder in a disconnected environment

Ansible Automation Platform 2 introduced execution environments as a replacement for python virtual environments. Execution environments are container images which contain everything needed to execute an Ansible playbook: A version of ansible-core A version of Python Python modules/dependencies Ansible collections (optional) The move to containers is really about solving the problem of how we package and distribute everything needed to run a playbook so that it runs consistently wherever we run it - a laptop, a RHEL server or automation controller. [Read More]

Using Molecule for VM provisioning roles

I help to run a demo/lab environment for Red Hat Pre-Sales in the UK. We heavily use Ansible to automate as much as possible in the lab and we offer push-button Automation to end users via Ansible Tower. I’ve been using Molecule more and more to improve our ability to test and promote changes to Ansible code. I wanted to write up a few different scenarios I have come across for using Molecule. [Read More]

Testing Ansible roles with Molecule and VMware

Molecule is a tool to aid with the testing and development of Ansible roles. It allows users to spin up test infrastructure to provide a quick and easy means with which to test Ansible roles. Typically the test instances are containers as they are lightweight and typically very fast to create and destroy. There are a number of posts out there that describe the process of using molecule with containers but I didn’t find many that describe the process for testing molecule with Virtual Machines. [Read More]

Filtering hosts with the Satellite inventory plugin for Ansible

Another post on inventory filtering in Ansible - this time for Red Hat Satellite. I’ve written about inventories and filtering in a few places so for some background information you can read these posts on constructed inventory plugins, VMware filtering and on ansible.com/blog around the servicenow plugin. Put simply, Ansible inventory plugins allow you to query a “Source of Truth” so that you can: Effectively and efficiently maintain a list of all of your managed nodes for Ansible. [Read More]

Ansible VMware Dynamic Inventory - Filter on tags

I’ve written about dynamic inventories before and why they are useful both around constructed inventory plugins and on ansible.com/blog around the servicenow plugin - so I won’t repeat it all again here. Dynamic inventories are great for allowing Ansible to use other platforms to provide a list of endpoints to manage and also to help to classify those endpoints. If we take the VMware inventory plugin as an example, I might not want to import every VMware VM into Ansible as a managed endpoint. [Read More]

Install Ansible Tower from Satellite 6

In this post, we will look at how you can use Red Hat Satellite as a content source for installing Ansible Tower. You may be wondering why we even need to write this process up? Well the simple answer is that the Ansible Tower installation doesn’t follow the “usual” pattern. What is the “usual” pattern? Many of the Red Hat products are made available via Red Hat’s Content Delivery Network (CDN) in the form of RPM repositories. [Read More]

Ansible Tower Dynamic Inventories - Manage Enabled Hosts

If you have used dynamic inventories in Ansible Tower before, you may have noticed that it adds some logic to determine whether a host should be enabled for job execution or not. For example, when syncing with our Red Hat Virtualisation environment, it has set some of our hosts to disabled. Why do we get this behaviour? In the case of Red Hat Virtualisation you can probably tell from the screen shot - Tower will disable any VM’s which are powered off and we can see the VM’s which are disabled show a state of “status_down”. [Read More]