azure
azure copied to clipboard
azure_rm_virtualmachinescaleset: allowed choices of managed_disk_type incomplete
SUMMARY
The managed_disk_type parameter for os- and data-disks restricts to only Standard_LRS and Premium_LRS instead of:
managed_disk_type=dict(type='str', choices=['Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS', 'Premium_ZRS', 'StandardSSD_ZRS']),
see: https://github.com/ansible-collections/azure/blob/c513b46f3200932994d696ed22d808f776f6af42/plugins/modules/azure_rm_virtualmachinescaleset.py#L547
Compare with: https://docs.microsoft.com/en-us/cli/azure/vmss?view=azure-cli-latest#az_vmss_create
--storage-sku The SKU of the storage account with which to persist VM. Use a singular sku that would be applied across all disks, or specify individual disks. Usage: [--storage-sku SKU | --storage-sku ID=SKU ID=SKU ID=SKU...], where each ID is "os" or a 0-indexed lun. Allowed values: Standard_LRS, Premium_LRS, StandardSSD_LRS, UltraSSD_LRS, Premium_ZRS, StandardSSD_ZRS.
ISSUE TYPE
- Bug Report
COMPONENT NAME
azure.azcollection.azure_rm_virtualmachinescaleset
ANSIBLE VERSION
ansible [core 2.11.2]
config file = None
configured module search path = ['/home/<user>/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/<user>/.local/lib/python3.6/site-packages/ansible
ansible collection location = /home/<user>/.ansible/collections:/usr/share/ansible/collections
executable location = /home/<user>/.local/bin/ansible
python version = 3.6.9 (default, Jan 26 2021, 15:33:00) [GCC 8.4.0]
jinja version = 2.11.3
libyaml = True
COLLECTION VERSION
# /home/<user>/.local/lib/python3.6/site-packages/ansible_collections
Collection Version
------------------ -------
azure.azcollection 1.7.0
# /home/<user>/.ansible/collections/ansible_collections
Collection Version
------------------ -------
azure.azcollection 1.7.0
CONFIGURATION
ANSIBLE_PIPELINING(/home/<user>/Repos/ansible/ansible.cfg) = True
DEFAULT_ROLES_PATH(/home/<user>/Repos/ansible/ansible.cfg) = ['/home/<user>/Repos/ansible/roles']
DEFAULT_TIMEOUT(/home/<user>/Repos/ansible/ansible.cfg) = 40
DISPLAY_SKIPPED_HOSTS(/home/<user>/Repos/ansible/ansible.cfg) = False
HOST_KEY_CHECKING(/home/<user>/Repos/ansible/ansible.cfg) = False
OS / ENVIRONMENT
NAME="Ubuntu"
VERSION="18.04.5 LTS (Bionic Beaver)"
STEPS TO REPRODUCE
- name: "Create a VMSS with a custom image"
azure_rm_virtualmachinescaleset:
auth_source: "{{ azure_auth_source }}"
subscription_id: "{{ azure_subscription_id }}"
resource_group: "{{ azure_rg_name }}"
name: "{{ azure_vmss_name }}"
vm_size: Standard_D4s_v3
capacity: 0
virtual_network_resource_group: "{{ azure_vnet_resource_group }}"
virtual_network_name: "{{ azure_vnet_name }}"
subnet_name: "{{ azure_subnet_name }}"
public_ip_per_vm: no
upgrade_policy: Manual
admin_username: "{{ azure_vm_admin_username }}"
admin_password: "{{ azure_vm_admin_password }}"
image: "{{ azure_image_name }}" # custom Win10 image within the vmss' resource group
os_type: "Windows"
managed_disk_type: "StandardSSD_LRS"
register: vmss_output
EXPECTED RESULTS
The os disk can be configured as a managed disk of type StandardSSD_LRS.
ACTUAL RESULTS
The os disk can NOT be configured as a managed disk of type StandardSSD_LRS.
TASK [win_azure_image_to_vmss : Create a VMSS with a custom image] ***********************************************************************************
task path: /home/<user>/Repos/ansible/roles/win_azure_image_to_vmss/tasks/main.yml:9
fatal: [localhost]: FAILED! => {
"changed": false,
"invocation": {
"module_args": {
"ad_user": null,
"adfs_authority_url": null,
"admin_password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"admin_username": "<redacted>",
"api_profile": "latest",
"append_tags": true,
"application_gateway": null,
"auth_source": "cli",
"capacity": 0,
"cert_validation_mode": null,
"client_id": null,
"cloud_environment": "AzureCloud",
"custom_data": null,
"data_disks": null,
"enable_accelerated_networking": null,
"ephemeral_os_disk": null,
"image": "<redacted>",
"load_balancer": null,
"location": null,
"log_mode": null,
"log_path": null,
"managed_disk_type": "StandardSSD_LRS",
"name": "<redacted>",
"os_disk_caching": "ReadOnly",
"os_type": "Windows",
"overprovision": true,
"password": null,
"plan": null,
"profile": null,
"public_ip_per_vm": false,
"remove_on_absent": [
"all"
],
"resource_group": "<redacted>",
"scale_in_policy": null,
"secret": null,
"security_group": null,
"short_hostname": null,
"single_placement_group": true,
"ssh_password_enabled": true,
"ssh_public_keys": null,
"state": "present",
"subnet_name": "<redacted>",
"subscription_id": "<redacted>",
"tags": {
"deploymentStyle": "<redacted>",
"owner": "<redacted>"
},
"tenant": null,
"terminate_event_timeout_minutes": null,
"tier": null,
"upgrade_policy": "Manual",
"virtual_network_name": "<redacted>",
"virtual_network_resource_group": "<redacted>",
"vm_size": "Standard_D4s_v3",
"zones": null
}
},
"msg": "value of managed_disk_type must be one of: Standard_LRS, Premium_LRS, got: StandardSSD_LRS"
}