Today, I follow our Workshop Ansible Basics with Jérôme Witt.

Why I follow this workshop?
First, it’s to have the basics and Best Practices before begin myself and do “bricolage” by my customers.
The second point is to develop templates to use and reuse by all customers if needed.

Let’s start the course!

My first remark is that the Control node cannot be installed on a Windows machine… Not good news for me! 👿
I need to go deeply in my memory to use Linux command again but it’s coming fast and with a little help from Jérôme!

The workshop have at the begin, already a lot of questions like “How many Control nodes we need for a project, environment, Business units, etc?” or “Need I one or more Standalones or it’s working on a cluster mode?” or “What are the resources needed?”
I let you discover these answers in our Workshop, of course!
One big advantage of Ansible is that is Agent less for the managed nodes but you need to install Python.

First command in ansile is to verify the installed version:

ansible --version

A recommendation is to install every time the OS version or pip.
A best practice is to begin to configure our ansible first through the configuration file following our recommendation.
Have a look on the documentation about this step here
It’s a step often forgotten when people start with Ansible.

The second recommendation is to build our Inventory by using a Yaml file.
With a lot of experiences by our consultants, dbi services define  good recommendations & BPs, how to define the variables in the inventory file.
One good tips is to have groups and not have all hosts in the @ungroupped like our workshop. You display your variables to verify the structure of our inventory with the command:

ansible-inventory --graph –vars

One little chapter on the setup is consecrated to Windows managed nodes. 😉
For windows, you need some requirements PowerShell 3.0 or +, at least .NET 4.0 and WinRM.
You have approximately 40 modules for Windows. I will be happy to test some modules in the future 😎

Let’s go to the most important point on the workshop, the playbook!
One tip that are useful is to give a name for all tasks in the playbook to have the possibility to use the command –start-at-task if needed.
To illustrate this, i do it during the workshop.
I have 4 tasks and I want to begin at my second task named “Test the ping” with the command:

ansible-playbook --start-at-task="test the ping" test.yml

It’s working fine! Very nice and I advise you to not forget to name your task!
I will stop here this blog and let you discover the rest of the workshop like the roles (and because I need to do the practice also 😕 ).

At the end of this day, I see a lot of possibilities in our SQL Server and SQL Azure world!
I have also now a lot of ideas and help my customers to be more efficient during a lot of our DBA tasks.
Thank you Jérôme for this Workshop and your knowledge sharing about Ansible.

I really advise all of you to follow this 1 day Ansible Workshop @dbi services

Thumbnail [60x60]
Stéphane Haby