From the course: Ansible: From Basics to Guru by Pearson

Unlock this course with a free trial

Join today to access over 25,200 courses taught by industry experts.

Using playbooks to manage Azure

Using playbooks to manage Azure

In this video, we'll talk about how to use Playbooks to manage Azure. So to start with, you need to use localhost as a host, because really, you are going to use your credentials from localhost to reach out to Azure. Notice that some Azure modules are not really idempotent, so check what you are doing and do it the right way. I have a couple of example playbooks in the Azure directory in the Git repository. We are going to check them out, and you will notice that in the sample playbook, Azure remove Azure stuff old, you will notice if you run it, that order does matter. Let's go have a look. Here is my Azure Git repository. We have a couple of files. Let me start with create Azure stuff old. The old one is a 2.9 syntax. The other one is a 2.10 syntax, where you can see that quite a lot of things are involved. It's running on host localhost. Then it is creating a resource group. Let's just not use testing. and let me use VI to change that throughout, because I want this to be unique…

Contents