In this recipe, we will create a virtual machine and network interface using the public IP we created in the recipe, Working with public IP addresses. After creating a virtual machine with the public network interface, we will log into it using SSH. We have already seen how to create a virtual machine in the recipe, Creating an Azure virtual machine. We will also learn how this Ansible task differs from what we learned in the first recipe, Creating an Azure virtual machine.
Using public IP addresses with network interfaces and virtual machines
How do it...
- Create a NIC with the existing public IP address:
- name: Create network interface card using existing public ip address
azure_rm_networkinterface:
name: nic02
...