Introducing Ansible architecture and configuration management
In the introduction to this chapter, we captured one of the essential aspects of Ansible – it’s a tool for automating workflows. Almost any Linux system administration task can be automated using Ansible. Using the Ansible CLI, we can invoke simple commands to change the desired state of a system. Usually, with Ansible, we execute tasks on a remote host or a group of hosts.
Let’s use the classic illustration of package management. Suppose you’re managing an infrastructure that includes a group of web servers, and you plan to install the latest version of a web server application (Nginx or Apache) on all of them. One way to accomplish this task is to SSH into each host and run the related shell commands to install the latest web server package. If you have a lot of machines, this will be a big task. You could argue that you can write a script to automate this job. This is possible, but then...