Ansible tips’n’tricks: a new series

In the past few months I have spent considerable amounts of time working on new technology (new as in “new to me”) and one of the things I have found a great interest-and more importantly-use cases with, is Ansible.

Ansible is a fantastic piece of technology with decent documentation and great community support. I didn’t find writing Ansible code too hard. Most of the problems I have encountered while learning how to write Ansible playbooks have-in some way or another-already been encountered and solved by other users. It does require a bit of Internet research, and you will need check if the solution offered somewhere on the Internet is still valid with the current version of the tool. As with a lot of other software, Ansible evolves at a rather quick pace and keeping up can be a bit of a challenge. But it’s a lot of fun!

I promise not to get into details about what Ansible is, others have done so and I’m not a great fan of repeating what more clever people have said. Head over to the official documentation for an introduction. For the most part I consider it pretty straight forward and elegant. It sure beats my attempts at writing bash code ;)

Having said that it might require a minute or so to get used to the markup language; most so-called playbooks are written in YAML and you learn to appreciate the importance of white space in your scripts. Another key concept I personally found quite important to understand is idempotency. A script that is considered to be idempotent can be re-run multiple times safely. There are other important concepts to be aware of, and you should consult the documentation to learn more about these if you aren’t yet familiar with them.

My main reason for using Ansible is to automate routine tasks in my personal lab environment, and this little series I’m planning on writing is primarily a “note to self” so I don’t forget how to do things. As with the Oracle posts I plan on writing I’ll add a “tested/written with version x” so later on when someone hits this article series via a search engine what it requires to do the same.

If you like to browse all articles, you should keep an eye out on articles tagged “Ansible”. You’ll find them in the automation and cloud categories.