mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +00:00
vm size idempotence (#45108)
This commit is contained in:
committed by
Yunge Zhu
parent
55c549a832
commit
9bd702ef37
@@ -901,6 +901,13 @@ class AzureRMVirtualMachine(AzureRMModuleBase):
|
||||
changed = True
|
||||
vm_dict['properties']['storageProfile']['osDisk']['diskSizeGB'] = self.os_disk_size_gb
|
||||
|
||||
if self.vm_size and \
|
||||
self.vm_size != vm_dict['properties']['hardwareProfile']['vmSize']:
|
||||
self.log('CHANGED: virtual machine {0} - size '.format(self.name))
|
||||
differences.append('VM size')
|
||||
changed = True
|
||||
vm_dict['properties']['hardwareProfile']['vmSize'] = self.vm_size
|
||||
|
||||
update_tags, vm_dict['tags'] = self.update_tags(vm_dict.get('tags', dict()))
|
||||
if update_tags:
|
||||
differences.append('Tags')
|
||||
|
||||
Reference in New Issue
Block a user