Playbook to Create a VM with OS and multiple data storage accounts

0 votes

Hey, I would like to write a playbook to create a VM with OS and multiple data storage accounts on Azure. How do I do that?

Mar 27, 2019 in Ansible by Neha
882 views

1 answer to this question.

0 votes

Hey @Neha, you can write a task like this:

- name: Create a VM with OS and multiple data storage accounts
  azure_rm_virtualmachine:
    resource_group: Testing
    name: testvm001
    vm_size: Standard_DS1_v2
    admin_username: adminUser
    ssh_password_enabled: false
    ssh_public_keys:
    - path: /home/adminUser/.ssh/authorized_keys
      key_data: < insert yor ssh public key here... >
    network_interfaces: testvm001
    storage_container: osdisk
    storage_blob: osdisk.vhd
    image:
      offer: CoreOS
      publisher: CoreOS
      sku: Stable
      version: latest
    data_disks:
    - lun: 0
      disk_size_gb: 64
      storage_container_name: datadisk1
      storage_blob_name: datadisk1.vhd
    - lun: 1
      disk_size_gb: 128
      storage_container_name: datadisk2
      storage_blob_name: datadisk2.vhd
answered Mar 27, 2019 by Frankie

Related Questions In Ansible

0 votes
1 answer

Ansible Playbook for Creating a VM with OS and multiple data managed disks

Hey @Ammie, Try a playbook something like ...READ MORE

answered Mar 27, 2019 in Ansible by Stark
1,526 views
0 votes
1 answer

Playbook to create a VM on Azure

Hey @Bob, try something like this to ...READ MORE

answered Mar 27, 2019 in Ansible by Jason
1,093 views
0 votes
1 answer

Playbook to create VM with managed disk - ansible with azure

Hey @Kavya, try something like this: - name: ...READ MORE

answered Mar 27, 2019 in Ansible by Jobin
2,516 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,062 views
+2 votes
1 answer
0 votes
1 answer

Playbook to create VM with existing storage account on Azure

Hey @Layla, try something like this: - name: ...READ MORE

answered Mar 27, 2019 in Ansible by Barbara
1,187 views
0 votes
1 answer

Playbook to create availability disk for a VM

Hey @Chandan, try something like this: - name: ...READ MORE

answered Mar 27, 2019 in Ansible by Harsh
606 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP