diff --git a/changelogs/fragments/77-vmware_rest-dont_use_folder.yaml b/changelogs/fragments/77-vmware_rest-dont_use_folder.yaml new file mode 100644 index 0000000..3701550 --- /dev/null +++ b/changelogs/fragments/77-vmware_rest-dont_use_folder.yaml @@ -0,0 +1,2 @@ +minor_changes: + - "Fix for use folder attribute for host and dc module only" diff --git a/roles/module_openapi_cloud/templates/module_directory/vmware_rest/default_module.j2 b/roles/module_openapi_cloud/templates/module_directory/vmware_rest/default_module.j2 index 7b11fdc..910b5ba 100644 --- a/roles/module_openapi_cloud/templates/module_directory/vmware_rest/default_module.j2 +++ b/roles/module_openapi_cloud/templates/module_directory/vmware_rest/default_module.j2 @@ -85,7 +85,7 @@ async def _{{ operation }}(params, session): {% if name in ["vcenter_host", "vcenter_datacenter"] %} if "folder" not in params: return - search_filter = f"&folders={params.get['folder']}" + search_filter = f"&folders={params.get('folder')}" {% endif %} if "name" not in params: return