Playbook to create VM with existing storage account on Azure

0 votes
I'm trying to create a playbook to bring up a VM with already existing storage account and NIC. How do I start writing the playbook?

Thanks in advance.
Mar 27, 2019 in Ansible by Layla
915 views

1 answer to this question.

0 votes

Hey @Layla, try something like this:

- name: Create a VM with existing storage account and NIC
  azure_rm_virtualmachine:
    resource_group: Testing
    name: testvm002
    vm_size: Standard_D4
    storage_account: testaccount001
    admin_username: adminUser
    ssh_public_keys:
      - path: /home/adminUser/.ssh/authorized_keys
        key_data: < insert yor ssh public key here... >
    network_interfaces: testvm001
    image:
      offer: CentOS
      publisher: OpenLogic
      sku: '7.1'
      version: latest
answered Mar 27, 2019 by Barbara

Related Questions In Ansible

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

How to create a key pair on AWS using Ansible-Playbook?

Hi@akhtar, You can find the ec2_key module in ...READ MORE

answered Aug 12, 2020 in Ansible by MD
• 95,440 points
1,134 views
0 votes
1 answer

How to create an Elastic Load Balancer in AWS with Ansible Playbook?

Hi@akhtar, You can find one module in ansible ...READ MORE

answered Oct 12, 2020 in Ansible by MD
• 95,440 points
920 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
3,504 views
+2 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 27, 2019 in Ansible by Jobin
2,194 views
0 votes
1 answer
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