Skip to content

Commit

Permalink
BUG FIX: Get latest VM image version (#606)
Browse files Browse the repository at this point in the history
* get latest vm iamge

* format

* format

* format

* format
  • Loading branch information
xuzhang3 authored Aug 23, 2021
1 parent 45b239d commit 1f15208
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugins/modules/azure_rm_virtualmachine.py
Original file line number Diff line number Diff line change
Expand Up @@ -1975,7 +1975,9 @@ def get_marketplace_image_version(self):
versions = self.compute_client.virtual_machine_images.list(self.location,
self.image['publisher'],
self.image['offer'],
self.image['sku'])
self.image['sku'],
top=1,
orderby='name desc')
except Exception as exc:
self.fail("Error fetching image {0} {1} {2} - {3}".format(self.image['publisher'],
self.image['offer'],
Expand Down

0 comments on commit 1f15208

Please sign in to comment.