Added documentation and example for quiet option

This commit is contained in:
Mandar Kulkarni 2021-07-12 09:13:16 -07:00
parent adb459b64e
commit 19a961c118

View file

@ -186,6 +186,11 @@ options:
type: bool type: bool
default: true default: true
version_added: '1.3.0' version_added: '1.3.0'
quiet:
description:
- This specifies rsync quiet option which on yes/true suppresses the non-error messages
type: bool
default: no
notes: notes:
- rsync must be installed on both the local and remote host. - rsync must be installed on both the local and remote host.
@ -343,6 +348,12 @@ EXAMPLES = r'''
src: /tmp/localpath/ src: /tmp/localpath/
dest: /tmp/remotepath dest: /tmp/remotepath
rsync_path: /usr/gnu/bin/rsync rsync_path: /usr/gnu/bin/rsync
- name: Synchronization with --quiet option enabled
ansible.posix.synchronize:
src: some/relative/path
dest: /some/absolute/path
quiet: yes
''' '''
@ -610,7 +621,6 @@ def main():
else: else:
(rc, out, err) = module.run_command(cmdstr) (rc, out, err) = module.run_command(cmdstr)
# If quiet is true, supress the verbose output by suppressing changes but allowing errors
if quiet: if quiet:
cmd.append('--quiet') cmd.append('--quiet')