The preferred directory layout

As we have explored Ansible throughout this book, we have shown many times that the more your playbook grows in size and scale, the more likely you are to want to divide it up into multiple files and directories. A great example of this is roles, which we covered in Chapter 4, Playbooks and Roles, where we defined roles to not only enable us to reuse common automation code but also to split up what could potentially be a massive, single playbook into smaller, logically organized, manageable chunks. We also looked, in Chapter 3, Defining Your Inventory, at the process of defining your inventory file and how you can also split this up across multiple files and directories. What we have not looked at, however, ...

Get Practical Ansible 2 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.