name: Create VM
azure_rm_virtualmachine:
resource_group: “{{resource_group}}”
name: “{{vm_name}}”
location: North Central US
vm_size: “Standard_DS1_v2”
managed_disk_type: Standard_LRS
admin_username: “{{username}}”
ssh_password_enabled: false
ssh_public_keys:
- path: /home/azureuser/.ssh/authorized_keys
key_data: “{{ ssh_key }}”
network_interfaces: “{{ sn_name_03 }}”
storage_container: osdisk
storage_blob: osdisk.vhd
image:
architecture: “x64”
offer: “rockylinux”
publisher: “erockyenterprisesoftwarefoundationinc1653071250513”
sku: “free”
urn: “erockyenterprisesoftwarefoundationinc1653071250513:rockylinux:free:9.0.0”
version: “9.0.0”
data_disks: - lun: 0
disk_size_gb: 64
managed_disk_type: Standard_LRS - lun: 1
disk_size_gb: 128
managed_disk_type: Premium_LRS
Devloy failed:
“msg”: "Error creating or updating virtual machine azautomationvm - (VMMarketplaceInvalidInput) Creating a virtual machine from Marketplace image or a custom image sourced from a Marketplace image requires Plan information in the request