1

I need a book only about Ansible (without touching Vagrant, VirtualBox, Docker and other above-shell stuff).

About 6 months ago I tried reading the Ansible docs but these were totally un-understandable to me so I bought a good book by Jeff Geerling named "Ansible for DevOps" which is aimed of course for DevOps and thus includes extensive elaboration on software like Vagrant (OS-level virtualization-management tool), VirtualBox (OS-virtualization tool that is managed with Vagrant) and if I'm not wrong Jeff also touches Docker there, but this is not what I seek and had hard time understanding much because I had no DevOps background at the time besides some Bash.

I usually work with IaaS hosting services in which I can't even utilize Vagrant and VirtualBox and have no usage in Docker (I do well with Bash and some Bash extensions like Composer, Drush for Drupal and so forth which make Docker redundant for the projects I personally work on).

Is there a book that teaches Ansible but focuses only on Ansible, say, something that does general introduction to YAML, then to creating and playing Ansible playbooks on Linux environments (native/WSL)? Some kind of "Ansible for web developers" or "Ansible for general audience"?

3 Answers 3

1

I would highly recommend looking at this tutorial by digital ocean. How to install and configure Ansible on Ubuntu.

Although this tutorial is not a book, I had a similar situation with the ansible docs and trying to understand them when I first got started. This tutorial will provide an in depth hands on experience for getting started with ansible.

1

I used the O'Reilly Ansible book: "Ansible: Up and Running, 2nd Edition" to learn Ansible and found it well-paced and helpful. It suggests using Vagrant to work with a virtual machine (VM) on your normal desktop/laptop to practise what you've learned, an approach I find very helpful - including now, since this is also a great way to prototype Ansible playbooks before deploying them.

Vagrant is also the tool advocated by Michael Heap in his "Ansible from Beginner to Pro", which is a bit faster-paced. Published in 2016 it won't have some of the newer Ansible features.

PacktPub have several Ansible books, so one of those may suit, and finally you've found LeanPub's "Ansible for DevOps" by Jeff Geerling already. (Update: Jeff Geerling now has several 1-hour Ansible videos on YouTube)

I hope that helps.

PS: re. your wish to avoid Vagrant, Virtualbox etc - I suggest that you consider these as useful tools to help you on your Ansible journey: You don't need to know much about them atall (sufficient info is given in the books mentioned), but they make for a really helpful way of quickly testing and prototyping your Ansible work - particularly since you can create and destroy them at will - so it's easy to recover if you mess up badly, and easy to test a playbook on several different distros at once. If you really don't like the Vagrant/Virtualbox aspect, use a spare Linux machine, be that on your local network or out there on the 'net.

0

TL;DR blogs and videos are for the impatient. Books focus on mastery. Mastering Ansible means setting up a local lab for testing full repeatable automation so you can confidential push out changes continously. That is why the book "Ansible for Devops" covers local lab setup with vagrant.

Long Answer:

To the specific question is their a simplier book? Why would there be as blogs and videos will cover the "5 minute guide". Blogs or videos take hours or days of effort but books take months or years. The famous "for dummies" series breaks the mold but most technology books are going to be about mastery. As an "IT veteran" I had until recently overlooked how important videos are in learning new IT. Book publishers are having to adapt to the streaming generation and introductory books are going the way of the dodo.

The rest of this answer says why Ansible for Devops has early chapters on setting up a vagrant lab locally for testing.

Ansible is an agentless tool that runs commands in parallel over ssh. That's very different from many other tools that have a client-server-agent model where you have to install an agent on every server you deploy onto. This means that as long as your IaaS has ssh access, and they all do, you can run Ansible.

What is unique to every IaaS is how the networking is done or how hosts are created. Ansible starts after that assuming you have networking to your hosts and ssh access to those hosts. The Ansible for Devops book doesn't and shouldnt have a section on how to setup a test env on every IaaS provider. It focuses on setting up a test env on your local laptop. Not because that teaches about IaaS it's a load of new skills you need to make your laptop "an IaaS provider". It is because without that it's unlikely readers of the book are going to be able to master Ansible. Would you want to try to master a programming language that doesn’t run on your laptop?

If you work on physical or virtual machines with Ansible at a bank they might not let you run vagrant or Docker locally or even have admin rights to your laptop or root access on VMs. Mastering Ansible in those situations is really hard. You only have a few test boxes and you have to run the playbooks hundred of times on them to debug. How can you be sure your finished playbook will work first time on production boxes that you cannot access until go-live weekend when it must all work first time? You cannot. Why? Because your last test run on you test hosts might only have worked because of some setting you changes on those hosts weeks ago that you forgot to put into the playbooks.

People might ask "what's that to do with me as I don't have those issues”. The point is that if you can run vagrant on your laptop and you can rapidly test and experiment you can learn faster. You can also delete it all, and set it up from scratch, as final testing of your playbooks. That doesn't mean it will work first time on your IaaS if your ssh access to hosts and networking isn't set up but once they are you will be flying.

Mastering anything in the devops space isn't about "I finally got it working" its about "I can automate this to work first time in live and I can constantly improve it". That is why no book called "Ansible for Devops" would be worth buying if it didn't show you how to locally test against a multi server laboratory on your laptop.

I strongly recommend that people invest their time in setting up a lab on their laptop. It will save you weeks or months over a relatively short time frame. It's really annoying when your laptop has several different labs setup that get slightly conflicting software versions you have to debug but those few hours of extreme frustration pay back fast.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.