Skip to content

Commit

Permalink
Merge pull request #558 from Checkmk/fix/folder_module_idempotency
Browse files Browse the repository at this point in the history
Folder module - Fix idempotency when using attributes parameter for c…
  • Loading branch information
robin-checkmk authored Feb 15, 2024
2 parents e31d1ae + 66e0b06 commit 1b856a3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions changelogs/fragments/fix_folder_module_idempotency.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bugfixes:
- Folder module - Fix idempotency when using "attributes" parameter for creating a folder.
2 changes: 1 addition & 1 deletion plugins/modules/folder.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ def needs_update(self):

def create(self):
data = self.desired.copy()
if data.get("attributes", {}) != {}:
if data.get("attributes", {}) == {}:
data["attributes"] = data.pop("update_attributes", {})

if data.get("remove_attributes"):
Expand Down

0 comments on commit 1b856a3

Please sign in to comment.