@ -124,7 +124,7 @@ options:
rsync_timeout:
rsync_timeout:
description:
description:
- Specify a --timeout for the rsync command in seconds.
- Specify a --timeout for the rsync command in seconds.
default: 1 0
default: 0
required: false
required: false
set_remote_user:
set_remote_user:
description:
description:
@ -215,7 +215,7 @@ def main():
owner = dict(type='bool'),
owner = dict(type='bool'),
group = dict(type='bool'),
group = dict(type='bool'),
set_remote_user = dict(default='yes', type='bool'),
set_remote_user = dict(default='yes', type='bool'),
rsync_timeout = dict(type='int', default=1 0),
rsync_timeout = dict(type='int', default=0),
rsync_opts = dict(type='list')
rsync_opts = dict(type='list')
),
),
supports_check_mode = True
supports_check_mode = True
@ -243,7 +243,9 @@ def main():
group = module.params['group']
group = module.params['group']
rsync_opts = module.params['rsync_opts']
rsync_opts = module.params['rsync_opts']
cmd = '%s --delay-updates -FF --compress --timeout=%s' % (rsync, rsync_timeout)
cmd = '%s --delay-updates -FF --compress' % rsync
if rsync_timeout:
cmd = cmd + ' --timeout=%s' % rsync_timeout
if module.check_mode:
if module.check_mode:
cmd = cmd + ' --dry-run'
cmd = cmd + ' --dry-run'
if delete:
if delete: