Organize and write code with the help of Ansible playbooks and manage and automate your infrastructure seamlessly
Key Features
Book Description
Ansible Playbook Essentials will show you how to write a blueprint of your infrastructure, encompassing multitier applications using Ansible's playbooks. Beginning with basic concepts such as plays, tasks, handlers, inventory, and YAML Ain't Markup Language (YAML) syntax that Ansible uses, you'll understand how to organize your code into a modular structure. Building on this, you will study techniques to create data-driven playbooks with variables, templates, logical constructs, and encrypted data, which will further strengthen your application skills in Ansible. Adding to this, the book will also take you through advanced clustering concepts, such as discovering topology information about other nodes in the cluster and managing multiple environments with isolated configurations. As you approach the concluding chapters, you can expect to learn about orchestrating infrastructure and deploying applications in a coordinated manner. By the end of this book, you will be able to design solutions to your automation and orchestration problems using playbooks quickly and efficiently.
What you will learn
Write simple tasks and plays
Organize code into a reusable, modular structure
Separate code from data using variables and Jinja2 templates
Run custom commands and scripts using Ansible s command modules
Control execution flow based on conditionals
Integrate nodes and discover topology information about other nodes in the cluster
Encrypt data with Ansible Vault
Create environments with isolated configurations to match the application development workflow
Orchestrate infrastructure and deploy applications in a coordinated manner
Who this book is for
If you are a systems or an automation engineer who wants to automate common infrastructure tasks, deploy applications, and use orchestration to configure systems in a synchronized manner, this book is ideal for you. Some familiarity with the Linux/Unix command-line interface is necessary.
Table of Contents
Blueprinting your Infrastructure - Introduction to Plays
Going Modular with Roles
Separating code and data - Variables, Facts and Templates
Bringing in your existing code - Executing Custom Commands and Scripts