Ansible
Ansible provides open-source automation that reduces complexity and runs everywhere. Using Ansible lets you automate virtually any task.
Details
Roles
To facilitate this setup, I manage a variety of custom roles. These roles are responsible for handling distinct aspects of the configuration. Alongside these roles, I maintain several playbooks. Each playbook is designed to execute specific roles on designated targets.
To illustrate, if I need to provision a new cluster of virtual machines, I can execute a concise playbook. However, this would require minor adjustments to the IP address values within some of the role files.
This playbook would result in any hosts in the servers, and workers groups
being provisioned with the hashi, consul, nomad, and docker roles. (ie
installing the Hashicorp repository, install and configure Consul and Nomad, and finally install Docker).
---
- name: Setup cluster
hosts:
- servers
- workers
roles:
- hashi
- consul
- nomad
- docker
tags:
- setup
Other Uses
I’ve also used ansible in settings beyond VMs. For example, I’ve used it with Packer to provision custom Docker images, provision Coder templates, as part of the setup flow for my personal dotfiles, and to execute tasks on hosts on my LAN.