Ansible

https://zamariola.com.br/post/why-you-should-be-using-ansible/ansible-logo.png

Recently at my job I’ve been working with Ansible, which is an IT automation technology that is capable of issuing commands to multiple servers utilizing ssh. Because it utilizes ssh, it does not require any extra packages installed on target boxes. Ansible “scripts” are called playbooks, which are written in .yml format, but it also supports ad-hoc commands for one-time commands.

Ansible output from simple playbook

There are tons of customizations you can make to an ansible setup that gives all kinds of granular control to SysAdmins. For example, you can make groups in the `inventory` file that you can use in playbooks. This way if you wanted to group together your webservers and issue an upgrade to Apache on them, you could call that group in the playbook. You can also use ansible for file management, user management, and service management. All of this can be done with the use of variables and when statements (if-then statements for ansible). It truly is an impressive technology that can make management of hundreds of servers into a few lines of a yml file. I’ve only really begun to scratch the surface of what ansible can do in my humble little virtualbox lab, and although I recently changed my homelab setup to only include one Ubuntu server (due to concerns of disk space issues for a VM server), I’d like to use proxmox on a beefer server someday and use Anisble in my homelab setup. I’ve also thought about using it and terraform to have an install script of sorts for future workstations.

I’d like to give credit to Learn Linux TV who posted a fantastic beginner’s Ansible series that I worked through to get a good foundation for an upcoming project with ansible. He also included a couple of preliminary videos on ssh and git that were good little refreshers on those topics. I put all my work from the tutorial series and beyond into a github repo you can find here.

Follow Me on Mastodon! Follow Me on Twitter