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 in Ansible by Neha
59 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 by Frankie

Related Questions In Ansible

0 votes
1 answer
0 votes
1 answer

Playbook to create a VM on Azure

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

answered Mar 26 in Ansible by Jason
83 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 26 in Ansible by Jobin
355 views
+13 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 26, 2018 in DevOps & Agile by DragonLord999
• 8,380 points
205 views
0 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 26 in Ansible by Barbara
42 views
0 votes
1 answer

Playbook to create availability disk for a VM

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

answered Mar 26 in Ansible by Harsh
31 views