# Create Multiple VMs on Azure

**URL:** <https://forum.ansible.com/t/create-multiple-vms-on-azure/31700>\
**Category:** Ansible Project\
**Tags:** azure\
**Created:** [November 21, 2019, 11:28am UTC](https://forum.ansible.com/t/create-multiple-vms-on-azure/31700 "2019-11-21T11:28:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Meera\_Nagul](https://avatars.discourse-cdn.com/v4/letter/m/f05b48/32.png) [@Meera\_Nagul](https://forum.ansible.com/u/Meera_Nagul)\
**Post date:** [November 21, 2019, 11:28am UTC](https://forum.ansible.com/t/create-multiple-vms-on-azure/31700/1 "2019-11-21T11:28:52Z")

</div>

Hi Team,

I am working on playbook to deploy multiple virtual machines on Azure cloud, and i got succeed in that task, and am trying to run multiple tasks on newly created virtual machines using the same playbook which i used for creation. can somebody help me with this task please.

Thanks & Regards  
-Shaik

---

<div class="post-metadata">

**Author:** ![ffirg](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/ffirg/32/10029_2.png) [@ffirg](https://forum.ansible.com/u/ffirg)\
**Post date:** [November 21, 2019, 4:56pm UTC](https://forum.ansible.com/t/create-multiple-vms-on-azure/31700/2 "2019-11-21T16:56:08Z")

</div>

This is for AWS but you can get the concept and apply using azure modules instead: [https://github.com/ffirg/ansible/blob/master/vm\_orchestration/offpremise/roles/offprem/tasks/amazon.yml](https://github.com/ffirg/ansible/blob/master/vm_orchestration/offpremise/roles/offprem/tasks/amazon.yml)  
Basically capture register output and then use add\_host to create an in memory inventory to apply the rest of the config to.
