The 10 best tricks for taming Ansible

Right the First Time

Tip 10: Outlook

Finally, it's worth pointing out something of which some diligent Ansible users are unaware, even long-time admins. Ansible is great for controlling, creating, and deleting workloads in virtual environments, private cloud environments, and major hyperscalers. The tool is by no means limited to virtual instances. With extension kits for Azure, AWS, and Google Cloud Platform (GCP), Ansible helps you create the vast majority of resources offered by these three platforms, which makes it easy to create an Ansible playbook that first creates a virtual private cloud (VPC) in Azure, along with the appropriate security groups, and then launch an Elastic Compute Cloud (EC2) instance with an attached volume. Idempotency, which is a central design element in Ansible, works, as well. If the named instance is already running and the administrator runs the playbook another time, Ansible simply checks the state and, if everything is in place, does nothing.

Ansible is thus an interesting option, especially for people who prefer to use the tools they know – rather than external tools – to manage cloud workloads. However, if in doubt, you need to check whether Ansible really does support all the features you need. Tools that specialize in running hybrid workloads in scalable environments typically also have features on board to help create networks across platforms (e.g., Morpheus, Figure 5). This also works with Ansible, but specialized tools offer more convenience.

Figure 5: Ansible can manage workloads in public clouds. However, tools such as Morpheus are better suited for running complex hybrid setups. © Morpheus


Ansible hides a huge amount of practical functionality behind a user interface with a relatively simple design. However, even many Ansible fans are often unaware of its real scope. In everyday life, this leads to Ansible setups that are far from ideal and often causes more work than necessary.

If you follow the principles described in this article, you will be able manage your entire Ansible environment in a Git directory without any difficulty. You will find that these tips greatly facilitate the application of the Infrastructure as Code (IaC) principle. Moreover, Ansible provides more than basic support for external services such as Azure, AWS, and GCP, which means the program will be up to the task of handling automation and – to some extent – orchestration in many setups.

This capability is all the more true because of Ansible's widespread adoption. Third-party vendors and the active community offer many modules, roles, and playbooks to help you manage the most common tools.

The Author

Freelance journalist Martin Gerhard Loschwitz focuses primarily on topics such as OpenStack, Kubernetes, and Chef.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy ADMIN Magazine

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

comments powered by Disqus
Subscribe to our ADMIN Newsletters
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs

Support Our Work

ADMIN content is made possible with support from readers like you. Please consider contributing when you've found an article to be beneficial.

Learn More”>


		<div class=