Skip to content

Commit

Permalink
Merge pull request #545 from msekania/feature_parents_attribute
Browse files Browse the repository at this point in the history
Feature parse parents attribute as list
  • Loading branch information
robin-checkmk authored Feb 14, 2024
2 parents b646c9c + 0d43296 commit e31d1ae
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions plugins/modules/host.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@

from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.common.dict_transformations import dict_merge
from ansible.module_utils.common.validation import check_type_list
from ansible.module_utils.urls import fetch_url


Expand Down Expand Up @@ -350,6 +351,11 @@ def run_module():
update_attributes = module.params.get("update_attributes", {})
state = module.params.get("state", "present")

for par in [attributes, update_attributes]:
if par != {}:
if par.get("parents"):
par["parents"] = check_type_list(par.get("parents"))

if module.params["folder"]:
module.params["folder"] = normalize_folder(module.params["folder"])

Expand Down

0 comments on commit e31d1ae

Please sign in to comment.