In this chapter, we have explored a large number of concepts that will help scale your infrastructure beyond the single node. We started with inventory files used to instruct Ansible about our machines, and then we covered how to have host-specific and group-specific variables while running the same command on multiple heterogeneous hosts. We then moved on to dynamic inventories that are populated directly by some other system (usually a cloud provider). Finally, we analyzed multiple kinds of iteration in the Ansible playbooks.
In the next chapter, we will structure our Ansible files in a saner way to ensure maximum readability. To do this, we introduce roles that simplify the management of complex environments even more.