Lately I have been looking in to Ansible Container as a way to keep all of my infrastructure declaration consistent. Using Ansible, I am able to control my entire VM lifecycle from start to finish, configure applications and services, run tests and even update my blog. What I could not do however, was build and provision container images.

Ansible Container looked fantastic, but every time I attempted to get started I was let down by the lack of resources available. Therefore, this guide will walk through creating an Ansible Container project from start to finish. We will be creating a simple Python Flask application, utilising a nginx proxy for the front-end and a redis database for the back-end.

But first, lets discuss why a tool like this is required in the first place.