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

0 votes

I'm trying to Create a VM with OS and multiple data managed disks on Azure. Can I please know how to write the playbook for it? Thank you

Mar 27 in Ansible by Ammie
54 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

Hey @Ammie, Try a playbook something like this:

- name: Create a VM with OS and multiple data managed disks
  azure_rm_virtualmachine:
    resource_group: Testing
    name: testvm001
    vm_size: Standard_D4
    managed_disk_type: Standard_LRS
    admin_username: adminUser
    ssh_public_keys:
      - path: /home/adminUser/.ssh/authorized_keys
        key_data: < insert yor ssh public key here... >
    image:
      offer: CoreOS
      publisher: CoreOS
      sku: Stable
      version: latest
    data_disks:
        - lun: 0
          disk_size_gb: 64
          managed_disk_type: Standard_LRS
        - lun: 1
          disk_size_gb: 128
          managed_disk_type: Premium_LRS
answered Mar 27 by Stark

Related Questions In Ansible

0 votes
1 answer
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
79 views
0 votes
1 answer
0 votes
1 answer

Configuration for setting up windows VM using ansible and vagrant

Hey @Leena,  your configuration file group_vars/windows-dev should contain something like: ansible_user: ...READ MORE

answered Feb 4 in Ansible by Vaishu
54 views
+13 votes
2 answers
0 votes
1 answer
0 votes
2 answers

Issue creating AWS VPC with Ansible

You can use the details given in ...READ MORE

answered Aug 16, 2018 in Ansible by Priyaj
• 56,140 points
127 views
0 votes
1 answer

Ansible playbook for moving files from one node to another remote node

The best way to do this is: copy ...READ MORE

answered Jan 16 in Ansible by Nigya

edited Jan 18 by Vardhan 488 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.