From 7532f876385b5e8ed25697d34a3832d53a3f83ae Mon Sep 17 00:00:00 2001 From: Borjan Tchakaloff Date: Fri, 1 Jan 2021 15:06:24 +0100 Subject: [PATCH] syncthing_folder: Accept permission ignoring flag Accept the `ignore_perms` flag matching the `folder.ignorePerms` 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 296b3b1..7379a05 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 + ignore_perms: + description: + - Whether to ignore permissions when looking for changes. + default: false host: description: - Host to connect to, including port @@ -167,7 +171,7 @@ def create_folder(params): 'hashers': 0, 'id': params['id'], 'ignoreDelete': False, - 'ignorePerms': False, + 'ignorePerms': params['ignore_perms'], 'label': params['label'] if params['label'] else params['id'], 'markerName': '.stfolder', 'maxConflicts': -1, @@ -208,6 +212,7 @@ def run_module(): label=dict(type='str', required=False), path=dict(type='path', required=False), devices=dict(type='list', required=False, default=False), + ignore_perms=dict(type='bool', required=False, default=False), host=dict(type='str', default='http://127.0.0.1:8384'), api_key=dict(type='str', required=False, no_log=True), timeout=dict(type='int', default=30),