Skip to content

Commit 087fb71

Browse files
Merge pull request #495 from netscaler/skip
Adding support to update contents of systemfile
2 parents 6113dce + 161eeeb commit 087fb71

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

plugins/module_utils/module_executor.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,13 @@
4444
from .nitro_resource_map import NITRO_RESOURCE_MAP
4545

4646

47+
skippable_resource_list = [
48+
# In some cases, although keys are listed as immutable in the nitro_resource_map, they can actually be updated.
49+
# This list helps bypass the immutability check for these resources.
50+
"sytemfile"
51+
]
52+
53+
4754
class ModuleExecutor(object):
4855
def __init__(self, resource_name, supports_check_mode=True):
4956
self.resource_name = resource_name
@@ -453,7 +460,7 @@ def create_or_update(self):
453460
self.client, self.resource_name, self.resource_module_params
454461
)
455462

456-
elif immutable_keys_list is None:
463+
elif immutable_keys_list is None or self.resource_name in skippable_resource_list:
457464
self.module_result["changed"] = True
458465
log(
459466
"INFO: Resource %s:%s exists and is different. Will be UPDATED."

0 commit comments

Comments
 (0)