Deploy to Azure
Deploy an Ansible development environment to Azure.
Ansible environment
The Ansible development environment in Azure
will comprise the following:
- Windows Server 2019 virtual machine
- Linux virtual machine running CentOS
Each virtual machine in Azure
requires several Azure
resources, and each of these resources is managed by different Ansible Modules.
Ansible Modules
The following are the required Azure
resources and the corresponding Ansible Modules:
Azure Resource | Azure Module |
---|---|
Resource Group | azure_rm_resourcegroup |
Virtual Network | azure_rm_virtualnetwork |
Subnet | azure_rm_subnet |
Public IP Address | azure_rm_publicipaddress |
Network Security Group | azure_rm_securitygroup |
Network Interface Card | azure_rm_networkinterface |
Custom Script Extension | azure_rm_virtualmachineextension |
Virtual Machine | azure_rm_virtualmachine |
Ansible codifies your infrastructure in YAML files called Ansible playbooks. You will use pre-written Ansible playbooks to deploy the Ansible development environment to Azure
.
Resource Dependency
Several of theAzure
resources depend on other resources. These dependencies mean that you have to run the playbooks in the right order.
Let’s start exploring the playbooks we will cover in this lesson one by one.
Create a resource group
First, you need to create a resource group. Review the playbook below:
Get hands-on with 1200+ tech skills courses.