60 lines
2.7 KiB
Diff
60 lines
2.7 KiB
Diff
From 9b4b5a5148d098d94e2307ad8ccc9392aae45463 Mon Sep 17 00:00:00 2001
|
|
From: Jeremy Cline <jeremycline@microsoft.com>
|
|
Date: Thu, 14 Mar 2024 09:51:43 -0400
|
|
Subject: [PATCH] galleryimage: Support gallery image definitions for Arm64
|
|
|
|
Allow creating VM image definitions for Arm64 images.
|
|
---
|
|
plugins/modules/azure_rm_galleryimage.py | 18 ++++++++++++++++++
|
|
1 file changed, 18 insertions(+)
|
|
|
|
diff --git a/plugins/modules/azure_rm_galleryimage.py b/plugins/modules/azure_rm_galleryimage.py
|
|
index ce027c0c4..9a4542458 100644
|
|
--- a/plugins/modules/azure_rm_galleryimage.py
|
|
+++ b/plugins/modules/azure_rm_galleryimage.py
|
|
@@ -76,6 +76,14 @@
|
|
- V1
|
|
- V2
|
|
type: str
|
|
+ architecture:
|
|
+ description:
|
|
+ - This property allows you to specify the hardware architecture of the Virtual Machines.
|
|
+ - Arm64 is only supported with Hyper V Version 2.
|
|
+ choices:
|
|
+ - Arm64
|
|
+ - x64
|
|
+ type: str
|
|
end_of_life_date:
|
|
description:
|
|
- The end of life date of the gallery Image Definition.
|
|
@@ -275,6 +283,11 @@ def __init__(self):
|
|
choices=['V1',
|
|
'V2']
|
|
),
|
|
+ architecture=dict(
|
|
+ type='str',
|
|
+ choices=['Arm64',
|
|
+ 'x64']
|
|
+ ),
|
|
end_of_life_date=dict(
|
|
type='str',
|
|
),
|
|
@@ -408,6 +421,8 @@ def exec_module(self, **kwargs):
|
|
self.body['properties']['osState'] = kwargs[key]
|
|
elif key == 'hypervgeneration':
|
|
self.body['properties']['hyperVGeneration'] = kwargs[key]
|
|
+ elif key == 'architecture':
|
|
+ self.body['properties']['architecture'] = kwargs[key]
|
|
elif key == 'end_of_life_date':
|
|
self.body['properties']['endOfLifeDate'] = kwargs[key]
|
|
elif key == 'identifier':
|
|
@@ -490,6 +505,9 @@ def exec_module(self, **kwargs):
|
|
elif (self.body['properties'].get('hyperVGeneration') is not None and
|
|
self.body['properties']['hyperVGeneration'] != old_response['properties'].get('hyperVGeneration')):
|
|
self.to_do = Actions.Update
|
|
+ elif (self.body['properties'].get('architecture') is not None and
|
|
+ self.body['properties']['architecture'] != old_response['properties'].get('architecture')):
|
|
+ self.to_do = Actions.Update
|
|
elif (self.body['properties'].get('endOfLifeDate') is not None and
|
|
self.body['properties']['endOfLifeDate'] != old_response['properties'].get('endOfLifeDate')):
|
|
self.to_do = Actions.Update
|