From 8fee0cb1143682350d077d4ab2db8d4ee3856445 Mon Sep 17 00:00:00 2001 From: Borjan Tchakaloff Date: Fri, 1 Jan 2021 15:13:06 +0100 Subject: [PATCH] syncthing_folder: Accept file-system watcher flag Accept the `fs_watcher` flag matching the `folder.fsWatcherEnabled` attribute. --- library/storage/syncthing/syncthing_folder.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/library/storage/syncthing/syncthing_folder.py b/library/storage/syncthing/syncthing_folder.py index 0796324..ed493b4 100644 --- a/library/storage/syncthing/syncthing_folder.py +++ b/library/storage/syncthing/syncthing_folder.py @@ -39,6 +39,10 @@ options: description: - List of devices to share folder with required: false + fs_watcher: + description: + - Whether to activate the file-system watcher. + default: true ignore_perms: description: - Whether to ignore permissions when looking for changes. @@ -173,7 +177,7 @@ def create_folder(params): 'disableTempIndexes': False, 'filesystemType': 'basic', 'fsWatcherDelayS': 10, - 'fsWatcherEnabled': True, + 'fsWatcherEnabled': params['fs_watcher'], 'hashers': 0, 'id': params['id'], 'ignoreDelete': False, @@ -218,6 +222,7 @@ def run_module(): label=dict(type='str', required=False), path=dict(type='path', required=False), devices=dict(type='list', required=False, default=False), + fs_watcher=dict(type='bool', default=True), ignore_perms=dict(type='bool', required=False, default=False), type=dict(type='str', default='sendreceive', choices=['sendreceive', 'sendonly', 'receiveonly']),