Chapter 3. Variables and Host Management

Thus far, we have explored several key Ansible concepts: the inventory to define the managed hosts, the playbook to register the actions to execute against the managed hosts, and to variables or modules.

In this chapter, you’ll expand your knowledge and focus in on the area of variables and how they are involved in the host management, and in particular, the inventory. We will touch upon the differences between static and dynamic inventories, how to create and organize a hierarchy of hosts into groups, and how to define specific variables per host.

Speaking about variables, you will learn about several of the methods for which variables can be defined and the implications that are associated by each choice, and how they are appliesd on the host management operations. Finally, we will discuss how and where variables can be overridden along with protecting variables that contain sensitive ...

Get Red Hat Certified Engineer (RHCE) Ansible Automation Study Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.