© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2021
A. MallettRed Hat Certified Engineer (RHCE) Study Guidehttps://doi.org/10.1007/978-1-4842-6861-2_3

3. Creating an Ansible Inventory

Andrew Mallett1  
(1)
Peterborough, UK
 

When working with Ansible on our CentOS 8 controller, we can target hosts that we want to manage directly via a list of hosts. This list can be provided as an option to the ansible command. Certainly though, we can do better than this. Rather than an ad hoc list, we will want to create a persistent file-based list of hosts. This list is the Ansible inventory and within the file we can also define groups based around geography, function, or operating system, making it easy to target hosts specifically. ...

Get Red Hat Certified Engineer (RHCE) Study Guide: Ansible Automation for the Red Hat Enterprise Linux 8 Exam (EX294) 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.