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
41 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
36 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
116 views
0 votes
1 answer

Is it possible to run a playbook with a crontab?

Ofcourse you can run ansible playbook with ...READ MORE

answered Jan 17 in Ansible by Yesha
175 views
+13 votes
2 answers
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
18 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
16 views