Recent posts

Python: The difference between Lists & Tuples

May 03, 2017 | 7 minute read

A common misconception is that the only difference between Lists and Tuples is that the former is mutable while the latter is immutable. While this is true, it is only one of the differences between them as per the Q&As quoted below. Question #1 What’s the difference between lists and tuples? Answer #1 (Answer link) … This gives rise to...

Installing NTC Ansible

April 27, 2017 | 2 minute read

I’ve written about NTC-Ansible a couple of times already and thought now would be a good time to run you through the installation process. The github page provides some great information on the process, but I’d like to add a few extra details in this post. Note that there are two ways in which you can install custom modules. They work as well a...

Jinja2 Tests Overview

April 18, 2017 | less than 1 minute read

As per the Jinja documentation: Beside “filters“, there are also so-called “tests” available. Tests can be used to test a variable against a common expression. Filters such as selectattr() can accept tests as a parameter. As per the documentation: “selectattr() filters a sequence of objects by applying a test to the specified attribute of eac...

Jinja2 selectattr() Filter

April 18, 2017 | 1 minute read

As per the documentation: “selectattr() filters a sequence of objects by applying a test to the specified attribute of each object, and only selecting the objects with the test succeeding. If no test is specified, the attribute’s value will be evaluated as a boolean.“ Example #1 This blog post does a great job of demonstrating how to use sele...

Jinja2 Overview

April 18, 2017 | less than 1 minute read

There are two ways in which you can use Jinja templates inside of Ansible are: Templates Filters This blog post demonstrates both of these techniques being used. The information contained in the post is contained below for convenience. Data The following data will be used by the template and filter in the subsequent sections of this pa...