Jump to ratings and reviews
Rate this book

Ansible for DevOps

Rate this book
Ansible is a simple, but powerful, server and configuration management tool (with a few other tricks up its sleeve). This book will help those familiar the command line and basic shell scripting start using Ansible to provision and manage anywhere from one to thousands of servers.

The book begins with fundamentals, like installing Ansible, setting up a basic inventory file, and basic concepts, then guides you through Ansible's many uses, including ad-hoc commands, basic and advanced playbooks, application deployments, custom modules, and special cases like running ansible in 'pull' mode when you have thousands of servers to manage (or more). Everything is explained with pertinent real-world examples, often using Vagrant-managed virtual machines.

398 pages, Paperback

First published October 11, 2015

498 people are currently reading
661 people want to read

About the author

Jeff Geerling

2 books33 followers

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
224 (44%)
4 stars
209 (41%)
3 stars
57 (11%)
2 stars
7 (1%)
1 star
2 (<1%)
Displaying 1 - 30 of 32 reviews
Profile Image for Michael Koltsov.
110 reviews69 followers
April 6, 2017
I was given this book, which is an uncommon event for me as I usually buy all books by myself. Moreover, I was given a paper version of the book.

Therefore, there were absolutely no regrets regarding this book =) The book is concise and covers almost all parts of Ansible I’ve ever heard of. The only exception was the case when you need to deal with a server that’s under a jump host/bastion, which is very common for cloud deployments as they usually are done in a VPC network of some kind that not exposed to the outer world.

This book has plenty of handful examples, but the most useful thing in it were not them. The book covers some of the most undervalued parts of the Ansible ecosystem: Ansible Galaxy, Tower and it also has a decent set of invaluable pattern and best practices for writing your playbooks.

My score: 5/5, I’m not sure if you need to read anything more than this book if you plan to use Ansible professionally.
Profile Image for Amirali.
64 reviews5 followers
August 11, 2022
I picked up the book expecting it to be an advanced book and boy did it deliver.
It went so far that some solutions where like "why would someone even think to do it like this"; but it is what it is.
Profile Image for Eugene.
41 reviews
December 16, 2021
Ansible For DevOps очень и очень порадовала. Автор обстоятельно подошёл к делу. Первым делом там даётся ссылка на репозиторий git, где можно совершенно невозбранно скачать все примеры кода. Ничего не надо переносить руками из книги в текстовый редактор, что крайне удобно. Ещё один просто-таки жирующий плюс, что все примеры очень практические. При желании их можно использовать в реальном окружении с небольшими доработками. Но автору и этого мало! Помимо основного репозитория, у него по книге есть ссылки на дополнительные. В частности, где он разместил простейшие приложения на Ruby или NodeJS, чтобы отработать деплой с помощью Ansible, интеграционные тесты и многое другое. Помимо этого, автор загрузил весьма много примеров в Ansible Galaxy. Почти все примеры тоже рабочие, довольно сложные и их тоже можно применять в реальной практике. Тамошние плейбуки покрывают не только написание ролей, но и реальный продакшен. А ещё всякий там Green/Blue deployment, zero downtime, раскатку софта, находящегося за балансировщиком нагрузки и вот это всё.

Покрытие тем в книге крайне обширное. От простых плейбуков и развёртывания классического окружения с двумя серверами приложений и БД, до кластера ELK или Kubernetes. Посмотрите репозиторий, полезного там довольно много. Разбирайся — не хочу.

Автор не поленился и даже подготовил на каждый случай Vagrantfile, поэтому самостоятельно с ноля разворачивать виртуальные машины не придётся. Мало того, им же были подготовлены образы Vagrant специально для книги. Лепота да и только! Моё уважение, в общем. Все бы так писали книги. Единственный прокол здесь, это глава про dynamic inventories. Для демонстрации подхода, был выбран DigitalOcean. Вот только роли, связанные с деплоем дроплетов в DigitalOcean, уже успели сильно устареть и там, фактически, всё надо писать с нуля. Этот кусок книги пока пришлось мне отложить на будущее, поскольку сейчас мне не актуально и есть другие приоритеты. Есть ещё примеры для AWS, но их я не проверял.

Поскольку место ограничено, а рассказать хочется много, некоторые моменты даны вскользь. Так-то тестирование, CI/CD и отладка. Но автор для затравки даёт нам множество ссылок на материалы для самостоятельного изучения. А также имеется авторский блог, где тоже можно найти массу полезного.

В отличие от первой книги Mastering Ansible, её реально можно рекомендовать всем, кто изучает Ansible. Те, кто его знают, причешут и структурируют знания. Новички — узнают крайне много нового и сразу же могут начать писать своё. Обилие примеров на самый разный вкус тому способствуют.

Я могу сказать, что не пожалейте денег на хороший труд. Автор это честно заслужил.
Profile Image for Aki.
14 reviews
January 2, 2024
Just my two cents here.

At first it may look like a lot, 450 pages for one tool.. but it's not a lot, and here is why.

For some background:

I'm a computer science student but nothing like an IT or a Sysadmin or something, I rock Linux as my main computer and for my side computer for more than 3 years ago.

I run a few servers for various reasons but I got tired of contentiously running commands on the fly even if I can set up a machine in 5 minutes, still, I try to save time, so I read this book.

It completely changed my way around computers!

Some might keep reading and get tired, or do the exercises and it's.. weird?

Yes, because I think the way to use this book is by literally keeping it by your side as you work and try to come up with an ansible playbook and keep going back to the book as a guide if and when you need it, then you will understand it best, and it will be helpful best.

P.S.
Some complain about code issue, probably because you have the paper version, which is not always updated, hence you might have errors when you run exercises.

The way is to buy it from Leanpub website and download it as a PDF or something, it is always updated and I get notifications when that happens and I just download the newest version.
Profile Image for Sebastian Gebski.
1,187 reviews1,339 followers
March 2, 2020
Very good refresher (in my case).

Practical ("real-world playbooks"), properly structured, far better than mindless copying of on-line 101 tutorials (like the majority of books on similar topics). Developer-friendly and easy to follow. Covers all key topics - starting with managing the inventory, variable parts & secrets, ending with cases like "floating" deployment & rolling certificates.

Why not 5 stars then? The author has recently decided to exclude a hot topic into a separate book (K8s integration, there's just a brief chapter left), in general - the ecosystem integration chapter feels the least "complete" (or at least satisfactory - as it can never be "complete"). I missed a chapter on the best practices or most common errors. At least there's a short one on troubleshooting (e.g. using debug, fail, assert). I've also got disappointed with the testing - serverspec is mentioned but not covered at all.

In general - it's really a decent book. Not perfect, but still worth reading - 4-4.25 stars.
Profile Image for Kevin.
5 reviews6 followers
February 26, 2020
I really wanted to like this book.

Unfortunately, it seems that I spent most of my time getting side tracked by proof-reading, and troubleshooitng incorrect or incomplete instructions. This was an extremely frustrating distraction from what, initially, appeared to be a solid curriculum.

By the time I got about halfway through the exercises, I found myself distrusting the instructions and expecting the code to fail on the first try. Most times, unfortunately, I was correct in my expectations.

I definitely would not recommend this book to a beginner or anyone who hasn't got a few years of solid Linux sysadmin experience under their belt.

The book has potential but really needs a professional editor and tester to verify the code. It is commendable that the author chooses to open/crowd-source this; but, to find so many egregious errors five years after its initial publication is frustrating, to say the least.
Profile Image for Stephen Heverin.
221 reviews8 followers
September 9, 2017
This is an easy and solid introduction to Ansible and getting up to speed on thinking about your infrastructure as code. Even if you are looking at other tools and technologies in this space, it would still be a good idea to read this book. Outside of the syntax specific to Ansible, the use cases, processes and guidelines presented are applicable to any tool looking to do infrastructure as code (IaC), DevOps, or CI/CD.
Profile Image for Kai Weber.
519 reviews46 followers
June 15, 2023
Simply the bible for Ansiblists. The author is the most prolific producer of "roles" in the Ansible galaxy, i. e. open source reusable components that virtually every serious user of Ansible has encountered. With his experience and success he is the best teacher on Ansible that you can imagine.
The book is well-written, has a good, slightly iterative progression, going from the simple basics into more depth, and has lots of helpful, reusable examples. I imagine it a good introduction for newcomers, yet my reading situation was not exactly that. I'm using Ansible for five years now, have learned by example, trial-and-error and scanning through the official Ansible documentation, have come up with some of my own ideas of best practices. Reading this book now gave me a very good push to want to keep improving my style of writing and organizing Ansible recipes for server provisioning (called "playbooks" in the Ansible world) - and also provided some reassurance that I am not totally off-track with what I have done in the past years with this technology.
4 reviews
January 5, 2025
I'm happy I had this book. It was written with love for sure.
But examples there are kinda outdated. I mean VM usage, for example, particularly Vagrant. It's important to know that people run services inside Docker containers now. And GlusterFS, I may be wrong, but Glatter was acquiring by Red Had in 2011, and since the first day of this year, 2025, its support has been ended.
So, keeping in mind the fact, when the book was issued and how many times it was edited, the last time BTW in the mid of 2023, I'd rate it with 5 stars! Many thanks to its author.
Profile Image for Piotr Pabis.
103 reviews4 followers
August 31, 2022
This book certainly covered more topics than I expected. It's a very comprehensive guide to Ansible for both beginners and intermediate users. The chapters separate the topic very well.

What in my opinion is lacking and I would love to know from this book is how to use Ansible + Terraform in a clean and maintainable way. Most examples in the book are done on local Vagrant VMs, in later chapters in Docker containers and there are also examples of provisioning Digital Ocean and AWS servers.
Profile Image for Soham Chakraborty.
113 reviews31 followers
November 7, 2017
Recommended for folks who are starting out in ansible. Lays out how the technology came into being, how it is used and how it can be used in configuration management/application deployment.

I still think that Puppet is the better tool for configuration management, albeit with a higher learning curve. We will see how the configuration management tools pan out in future.
54 reviews2 followers
August 17, 2020
I've relied on Jeff Geerling's Ansible roles for a while now and will keep doing so. I've probably learned as much peeking at them as I did from this book.

Still I appreciated an organized, comprehensive review of Ansible and I learned a few new things from the book (e.g. how to use Vagrant). Recommend for anyone getting into DevOps or web application development.
Profile Image for Meysam.
57 reviews
March 25, 2024
The book can be considered old (it was written at the time of Kubernetes 1.13) but it’s still full of insights and best practices on how to navigate and structure Ansible codebases.

It’s highly recommended for beginners and mid-level engineers, however, if you’re a senior, there is likely nothing new this book can add to your existing knowledge.
Profile Image for Logan.
2 reviews1 follower
June 1, 2018
I originally read this book when I started using Ansible a couple of years ago, and I just re-read it as part of a review. It's an excellent overview of Ansible, and Jeff Geerling regularly updates it to keep it current.
Profile Image for Miguel.
106 reviews6 followers
February 2, 2019
Good start to anyone using ansible for DevOps. If you're a seasoned DevOps professional, I'd skim then skip to the back to the best practices section. These are great but I don't think it's worth the cost of the book alone. I'd still recommend
Profile Image for wyclif.
189 reviews
September 25, 2020
Well thought-out book that will help you level up with Ansible, especially if you are moving up from Chef or Puppet. Author is very responsive to user feedback, has a great YouTube channel, and keeps the book continually updated.
Profile Image for Greg .
31 reviews2 followers
August 2, 2021
This book jumps into how to install/use Ansible and Vagrant without providing an overview of what Ansible is. Yes the book says that Ansible is a flexible configuration tool, what does that mean? More time should have been spent going into this and elaborating on technologies used in the book.

Profile Image for Tony Poerio.
212 reviews13 followers
October 8, 2017
Solid foundation and practical examples for using Ansible in your projects. If you're not sure where to start -- start here. Should give you everything you need.
Profile Image for Junior  Gantin.
4 reviews
March 27, 2021
Great book. Jeff is a great writer and teacher. I really recommend this book for anyone interested in Ansible or DevOps in general.
6 reviews
February 10, 2017
A very good introduction to Ansible. Easy to understand yet deep enough. I think it's a very good complimentary of the Ansible documentation, which is also surprisingly good.
379 reviews10 followers
October 1, 2015
Contiene molti utili esempi di cosa si possa fare con Ansible, è ben organizzato e copre diversi casi nuovi e interessanti.

Il problema è che le spiegazioni sono spesso scritte male, poco chiare o poco approfondite. A volte sembra scritto per qualcuno che conosce già Ansible e cerca solo qualche idea per usarlo.
187 reviews2 followers
August 1, 2016
Ansible for Devops is a collection of explained examples of playbooks by the author. In the process he explains the workings of ansible and how it connects with other tools. A fan of Ansible myself, I knew most of what was written already but learned some new things as well. As the book matures and gains new chapters (like the one on CI/CD), it becomes better and better. Good job Mr Geerling!
Profile Image for Ivan.
223 reviews10 followers
February 18, 2016
Хорошая книга, с подробными и, что главное, понятными объяснениями и вполне себе жизненными примерами. Хотя в основном про вэб, и т.д. Для новичков, вроде меня, в самый раз.
87 reviews5 followers
December 27, 2016
Quite good book, provides both theory and practice advises regarding Ansible, good enough to start to get familiar with the tool
Displaying 1 - 30 of 32 reviews

Can't find what you're looking for?

Get help and learn more about the design.