Mastering Ansible: Automate configuration management and overcome deployment challenges with Ansible

James Freeman & Jesse Keating

Language: English

Publisher: Packt Publishing

Published: Nov 1, 2021

Description:

Design, develop, and solve real-world automation and orchestration problems by unlocking Ansible's automation capabilities

Key Features

  • Completely revised and updated for Ansible 4.0 and beyond
  • Tackle complex automation challenges with the newly added features in Ansible
  • Learn about the rapidly expanding field of network automation using Ansible, with the help of practical examples for configuring network devices

Book Description

Ansible is a modern, YAML-based automation tool (built on top of Python, one of the world’s most popular programming languages) with a massive and ever-growing user base. Its popularity and Python underpinnings make it essential learning for all in the DevOps space.

This fourth edition of Mastering Ansible provides complete coverage of Ansible automation, from the design and architecture of the tool and basic automation with playbooks to writing and debugging your own Python-based extensions.

You'll learn how to build automation workflows with Ansible’s extensive built-in library of collections, modules, and plugins. You'll then look at extending the modules and plugins with Python-based code and even build your own collections — ultimately learning how to give back to the Ansible community.

By the end of this Ansible book, you'll be confident in all aspects of Ansible automation, from the fundamentals of playbook design to getting under the hood and extending and adapting Ansible to solve new automation challenges.

What you will learn

  • Gain an in-depth understanding of how Ansible works under the hood
  • Get to grips with Ansible collections and how they are changing and shaping the future of Ansible
  • Fully automate the Ansible playbook executions with encrypted data
  • Use blocks to construct failure recovery or cleanup
  • Explore the playbook debugger and Ansible console
  • Troubleshoot unexpected behavior effectively
  • Work with cloud infrastructure providers and container systems

Who this book is for

If you are an Ansible developer or operator who has a detailed understanding of its core elements and applications but are now looking to enhance your skills in applying automation using Ansible, this book is for you. Prior experience working with core system administration tasks on Linux and basic familiarity with concepts such as cloud computing, containers, network devices, and fundamentals of a high-level programming language will help you make the most of this book.

Table of Contents

  1. System Architecture and Design of Ansible
  2. Migrating from Earlier Ansible Versions
  3. Protecting Your Secrets with Ansible
  4. Ansible and Windows - Not just for Linux
  5. Infrastructure management for Enterprises with AWX
  6. Unlocking the Power of Jinja2 Templates
  7. Controlling Task Conditions
  8. Composing Reusable Ansible Content with Roles
  9. Troubleshooting Ansible
  10. Extending Ansible
  11. Minimizing Downtime with Rolling Deployments
  12. Infrastructure Provisioning
  13. Network Automation

Review

"Freeman and Keating's book has already reached its 4th edition, which is an accomplishment on its own. Mastering Ansible is the definitive guide to configuration management automation with Ansible. This is the only book you would need to learn Ansible. In the first section, you’ll learn what Ansible is and how it works, how to migrate from older versions, how to encrypt files, how to use Ansible with Windows and inside an enterprise environment with AWX. In the second section of the book, you’ll learn how to write Ansible playbooks with Jinja2, how to deal with errors, how to use roles, and how to use and extend Ansible. The third and last section of the book will teach you how to use Ansible for orchestration, infrastructure provisioning, and network automation. You’ll have more than 500 pages of Ansible goodies to learn and practice with, and to become proficient in using this great tool."

--

Alexandru Calcatinge (University Lecturer at Ion Mincu University of Architecture and Urban Planning, Romania)

About the Author

James Freeman is an accomplished IT consultant with over 20 years' experience in the technology industry. He has more than 8 years of first-hand experience of solving real-world enterprise problems in production environments using Ansible, frequently introducing Ansible as a new technology to businesses and CTOs for the first time. In addition, he has authored and facilitated bespoke Ansible workshops and training sessions, and has presented at both international conferences and meetups on Ansible Jesse Keating is an accomplished Ansible user, contributor, and presenter. He has been an active member of the Linux and open source community for over 15 years. He has firsthand experience involving a variety of IT activities, software development, and large-scale system administration. He has presented at numerous conferences and meetups, and has written many articles on a variety of topics.