This post is part of my Test-Driven Infrastructure series that covers TDI from start-to-finish. If you like this one, check out the others in this series.

My personal DevOps tools of choice for a Test-Driven Infrastructure (TDI) process are Ansible and Serverspec.

Here is what I like about each tool:

Ansible

Pros:

  • Agentless. I like this as adding a pull-based agent that introduces an entire extra level of complexity that’s not needed.
  • Few dependencies on host machines
  • Clean syntax that’s easy to learn
  • Tasks run in the order they are written, which makes it easy to think and reason about the system
  • Can also be used for launching VMs and building the actual underlying infrastructure (assuming you have a sufficiently automated cloud hosting provider)

Cons:

  • Doesn’t have a buit-in testing framework, but that is resolved by using Serverspec.

Serverspec

Pros:

  • Based on rspec, which myself and many others are already familiar with
  • Easy to use and get up and running

Cons:

  • Could be more closely tied to Ansible, but there are projects to fill the gaps, such as ansible_spec.