It’s true. If you’re looking for a product that can automate the tasks that you shouldn’t be wasting your time doing, it’s not going to be an easy find. Most products are either vastly complicated for the simple tasks you need accomplished, or too rigid to have the flexibility to work on a team as unique as yours.
If you haven’t heard, Red Hat’s Ansible is emerging as a go-to solution to fill this void for many IT operations. In celebration of CBT Nuggets trainer Shawn Powers’ latest course on Ansible Essentials, we gathered four reasons that you should consider in making the switch to Ansible.
1. Simple Enough to Get Started Right Now
To briefly review, you can build Ansible playbooks, which are collections of tasks run in order. Tasks call modules. Modules are where the rubber meets the road, executing specific actions like installing a Linux package or Windows role, running a command, replacing a config file, or making an API call.
Playbooks, while written in a specific format to be machine-readable, are also incredibly human readable. Check out this example playbook. Even if this is your first time seeing one, it should be crystal clear what it accomplishes.
Ansible calls itself a “batteries included” solution, meaning all the pieces necessary to start doing actual work are included in the box. More than 450 modules are included, covering a massive variety of admin domains. The power to do any IT chore is right there, ready to rock.
All this combines to reduce your switching costs drastically if moving from another orchestration platform. Ansible is also a massive step up from homemade batch files or shell scripts. Playbooks can have intelligence by checking if certain conditions exist and taking appropriate actions to complete or bail out the tasks. Yes, a script can do this, but many rage-filled admin hours have been wasted trying to custom code automation.
2. Power to Harness the Cloud
We could talk endlessly about the increased scalability and reliability cloud hosting can bring to your infrastructure. Need an extra two, three, or 3,000 hosts to handle increases in traffic to your site? With Ansible, it’s no problem. Playbooks can connect to a large number of cloud services to deploy and configure resources.
Let’s take AWS, for example. A playbook to deploy EC2 instances is a snap. Define your keys, region, instance type, quantity, etc., then push go. To deploy those scads of hosts, set the quantity variable to 3,000, run the playbook, then come back later to check the output and see the status of those 3,000 hosts, all within Ansible. Playbooks can wait until all the hosts are live, then continue running more tasks like installing and configuring packages, all while you watch with your feet up.
3. Centralized Management through Ansible Tower
This is where the real power starts to show. Up till now you’ve been editing playbook text files and kicking them off through the command line. Tower one-ups that, providing a web front-end to Ansible.
Logging in shows first a dashboard with stats about job successes and failures, and quick access to all your playbooks and hosts. Run a playbook by pushing a single button. Build templates to reuse playbooks filling in different sets of variables.
From here you can also grant access to individual users, giving some full admin rights while others are granted limited permissions. Want to give your devs self-service access to spin up new VMs or drop config changes, but not the keys to the kingdom? Tower’s granular access control gives you exactly that. Even users who aren’t Ansible experts can run or schedule your pre-built playbooks.
Along with seeing all your failed and successful jobs, Ansible retains complete logging and output from every job, allowing for quick auditing of who did what, when they did it, and what was the outcome. Keeping the output turned on from each task on every host the playbook was run on allows you to make logging as granular as you want or need. Auditing changes done programmatically through Ansible is lightyears ahead of manually tracking changes to your environment.
4. The Galaxy Community
While Ansible comes with a lot of power out of the box, they’ve built an entire community around users sharing custom roles. In Ansible parlance, a role can be seen as a chunk of a play, basically a group of tasks that you can call from your playbooks. For example, this role installs MySQL then sets some best practice security settings, hardening it immediately and freeing you up from repeating that configuration every time. Any time you’re writing a complex playbook, someone has probably done at least part of it before, so why redo the same work?
Ansible wraps a massive amount of power and flexibility in a package that is dead simple to get started with, and we’ve only scratched the surface! This power and simplicity combine to make it an emerging leader amongst a sea of automation tools, one worth a serious look if the tools in your box are starting to look too dull and constraining.