Introduction to Ansible

Introduction to Ansible

https://ift.tt/3zyF6O6

I’ve worked in IT for a long time, and my secret collection of shell and Python scripts has made a lot that works easier. I remember having a repository full of scripts to install this, automate that… you get the idea. Some of these have been my pride and joy, full of witty remarks, inside jokes, and pop culture references. And I’ve handed these down to teams that succeeded me with pride. But these DIY Adhoc scripts don’t scale well, and often cause more trouble than they’re worth.

Ansible is the tool to solve these problems. It’s a collection of several (hundred?) modules to do most of what you can imagine doing as a sysadmin/troubleshooter. You can assemble these modules into Playbooks and use them for Adhoc maintenance or reliable production use-cases. Say you need to set up a new Linux machine with Apache installed. In bash, you would write the installation commands one by one. But in Ansible, you can create a task for what you want and let Ansible take care of the rest. That’s the key difference: moving from how to what. With Ansible, you define the final state of your system and Ansible manages the execution – this is the difference between declarative and imperative.

links

via DZone https://dzone.com

August 31, 2021 at 09:03PM
Ayush Sharma