I'm just getting started with Ansible. I've made simple vms before using azure cli and that worked.
There's an option/flag, --use-unmanaged-disk. I've been googling like mad, but I can't see a similar option for use in an Ansible Playbook. This is the guide I've been trying: [ https://docs.microsoft.com/sl-si/azure/virtual-machines/linux/ansible-create-complete-vm]
If I'm missing any info, please let me know. Thanks in advance!
- 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
reference: http://docs.ansible.com/ansible/latest/azure_rm_virtualmachine_module.html#azure-rm-virtualmachine
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.