mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
remove option checking for azure vm sizes (enum will not contain all) as well as default and start requiring the vm_size param (#24406)
This commit is contained in:
parent
8c7a6cb8ac
commit
8026ef57fe
1 changed files with 2 additions and 6 deletions
|
@ -90,8 +90,7 @@ options:
|
||||||
description:
|
description:
|
||||||
- A valid Azure VM size value. For example, 'Standard_D4'. The list of choices varies depending on the
|
- A valid Azure VM size value. For example, 'Standard_D4'. The list of choices varies depending on the
|
||||||
subscription and location. Check your subscription for available choices.
|
subscription and location. Check your subscription for available choices.
|
||||||
default: Standard_D1
|
required: true
|
||||||
required: false
|
|
||||||
admin_username:
|
admin_username:
|
||||||
description:
|
description:
|
||||||
- Admin username used to access the host after it is created. Required when creating a VM.
|
- Admin username used to access the host after it is created. Required when creating a VM.
|
||||||
|
@ -487,7 +486,7 @@ class AzureRMVirtualMachine(AzureRMModuleBase):
|
||||||
state=dict(choices=['present', 'absent'], default='present', type='str'),
|
state=dict(choices=['present', 'absent'], default='present', type='str'),
|
||||||
location=dict(type='str'),
|
location=dict(type='str'),
|
||||||
short_hostname=dict(type='str'),
|
short_hostname=dict(type='str'),
|
||||||
vm_size=dict(type='str', choices=[], default='Standard_D1'),
|
vm_size=dict(type='str', required=True),
|
||||||
admin_username=dict(type='str'),
|
admin_username=dict(type='str'),
|
||||||
admin_password=dict(type='str', no_log=True),
|
admin_password=dict(type='str', no_log=True),
|
||||||
ssh_password_enabled=dict(type='bool', default=True),
|
ssh_password_enabled=dict(type='bool', default=True),
|
||||||
|
@ -511,9 +510,6 @@ class AzureRMVirtualMachine(AzureRMModuleBase):
|
||||||
started=dict(type='bool', default=True),
|
started=dict(type='bool', default=True),
|
||||||
)
|
)
|
||||||
|
|
||||||
for key in VirtualMachineSizeTypes:
|
|
||||||
self.module_arg_spec['vm_size']['choices'].append(getattr(key, 'value'))
|
|
||||||
|
|
||||||
self.resource_group = None
|
self.resource_group = None
|
||||||
self.name = None
|
self.name = None
|
||||||
self.state = None
|
self.state = None
|
||||||
|
|
Loading…
Add table
Reference in a new issue