Category: automation, ansible

Ansible delivers simple IT automation that ends repetitive tasks and frees up DevOps teams for more strategic work. Ansible is powerful IT automation that you can learn quickly.

Today, we will focus on the second task, which shows us one variable that we will use in the rest of the playbook to make sure we use the right module for the appropriate OS.

Showing this is simply for demo purposes; the value of this variable is stored in memory and you will see how we use it, but as you play around with Ansible and troubleshoot, you may want to view it as well.

As you can infer, this will only work on Windows servers, so once again you will see we have a “when” statement that checks for the value of ansible_distribution.

Related Articles