Skip to content

Commit

Permalink
Fixed #400 - unset not working for systemuser
Browse files Browse the repository at this point in the history
  • Loading branch information
sumanth-lingappa committed Apr 15, 2024
1 parent 91d443d commit 187218a
Show file tree
Hide file tree
Showing 4 changed files with 3,476 additions and 3,414 deletions.
6 changes: 5 additions & 1 deletion plugins/module_utils/module_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,9 @@ def is_attribute_equal(
attribute_type = NITRO_RESOURCE_MAP[self.resource_name]["readwrite_arguments"][
attribute_name
]["type"]
if attribute_type == "raw":
# for "raw" type, compare as string values
return str(existing_attribute_value) == str(module_params_attribute_value)
if attribute_type == "int":
return int(existing_attribute_value) == int(module_params_attribute_value)
if attribute_type == "float":
Expand All @@ -265,7 +268,8 @@ def is_attribute_equal(
str(existing_attribute_value).lower()
== str(module_params_attribute_value).lower()
)
return existing_attribute_value == module_params_attribute_value
# By default, compare as string values
return str(existing_attribute_value) == str(module_params_attribute_value)

@trace
def is_resource_identical(self):
Expand Down
Loading

0 comments on commit 187218a

Please sign in to comment.