« Previous 1 2 3 4
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.
Conclusions
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.
Infos
- Ansible Compact Logger: https://github.com/octplane/ansible_stdout_compact_logger
« Previous 1 2 3 4
Buy this article as PDF
(incl. VAT)
Buy ADMIN Magazine
Subscribe to our ADMIN Newsletters
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Most Popular
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.