Ansible Roles and Reusability

Reuse and module sharing in Ansible can be achieved through two methods: A “Role” which forms conceptually a single component and its related tasks. Second, “Content Collections” which form what we could consider as a namespace having a group of roles, in addition to “plugins” that provide the ability to craft custom modules.

Here’s a list of some roles I have published into the galaxy over the past months:

1. Docker Server

This roles differs from others in the community by the support to expose TCP/SSH socket for the docker daemon to allow external docker clients to build and use the server as centralized containers engine. Additionally, supports connecting to external image registries by setting the needed variables.

2. Plik Server

A temporary file upload system with minimal GUI.

3. Redis

This is merely a wrapper to deploy Bitnami’s redis chart to Kubernetes cluster.

4. Samba

I wrote this role to learn and experiment with the protocol. Mainly, translated from this article.

That’s it. I hope you find it insightful.