Posts

Showing posts from December, 2020

My first experience with Ansible

Image
  Images by Christina Morillo from pexels.com Recently, I did some Ansible scripting, and there are some initial struggles to develop good Ansible scripts. Firstly, Ansible scripts are implemented in YAML format. Hence these scripts can be unmaintainable very quickly if We do not document each step; We do not recreate reusable module libraries and/or ansible role. That's we copy and paste code We do not maintain small Ansible .yml files. Secondly, I suggest spending some time looking at some good Ansible scripts to accelerate learning. Actually, I spent much time looking at solutions in stackoverflow  because there are many interesting questions and answers. And, I found an expert, Vladimir Botka , and learn many things from him. On top these, read through Ansible best practices . Next, I found that list and object manipulation in Ansible  are not natural to me. Here are some of the things that I have learned. 1. Combining dictionaries I need to set default values to an obj