From a5eabf9ca6bd885edf6beaca368a28d2d2eed0da Mon Sep 17 00:00:00 2001 From: Swapnil Date: Wed, 8 May 2024 00:40:32 +0530 Subject: [PATCH] test - get devices --- collection/plugins/modules/folder.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/collection/plugins/modules/folder.py b/collection/plugins/modules/folder.py index 2c1b322..422c5f1 100644 --- a/collection/plugins/modules/folder.py +++ b/collection/plugins/modules/folder.py @@ -190,7 +190,7 @@ def run_module(): argument_spec=module_args ) - module2 = SyncthingModule( + device_module = SyncthingModule( api_url='/rest/config/devices', argument_spec=module_args ) @@ -210,13 +210,10 @@ def run_module(): else: module.delete_call(target=folder['id']) else: - devices_list = module2.get_call() + devices_list = device_module.get_call() existing_device_ids = [device['deviceID'] for device in devices_list] self_id = module.result['response']['x-syncthing-id'] - module.result['devices'] = devices_list - module2.result['devices'] = devices_list - if folder_exists: # exists but maybe needs changing if module.check_mode: module.result['changed'] = True @@ -235,7 +232,6 @@ def run_module(): module.post_call(data=folder_config_wanted) module.exit_json() - module2.exit_json() def main(): run_module()