Creating a playbook

Ansible provides a number of best practices on their website, available at http://bit.ly/1ZqdcLH. One emphasis in their documentation is on using roles. One crucial way to organize your playbook content is Ansible's roles organization feature, which is documented as part of the main playbooks page. Creating roles is a key component in making Ansible code sharable and modular enough so that you can reuse your code across services and playbooks. To demonstrate a proper structure, we are going to create a role that our playbook will then call.

Get Effective DevOps with AWS - Second Edition 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.