syncthing_folder: Accept permission ignoring flag

Accept the `ignore_perms` flag matching the `folder.ignorePerms`
attribute.
This commit is contained in:
Borjan Tchakaloff 2021-01-01 15:06:24 +01:00
parent 1136e9b06b
commit 7532f87638
1 changed files with 6 additions and 1 deletions

View File

@ -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),