mirror of
https://github.com/ansible-collections/ansible.posix.git
synced 2026-01-11 07:05:27 +01:00
Fix: moving conditional to correct place
This commit is contained in:
parent
fe7dd71bda
commit
1e0654f8b6
1 changed files with 4 additions and 3 deletions
|
|
@ -208,6 +208,7 @@ options:
|
||||||
- This specifies rsync quiet option which on yes/true suppresses the non-error messages
|
- This specifies rsync quiet option which on yes/true suppresses the non-error messages
|
||||||
type: bool
|
type: bool
|
||||||
default: no
|
default: no
|
||||||
|
version_added: '1.3.0'
|
||||||
|
|
||||||
notes:
|
notes:
|
||||||
- rsync must be installed on both the local and remote host.
|
- rsync must be installed on both the local and remote host.
|
||||||
|
|
@ -615,6 +616,9 @@ def main():
|
||||||
|
|
||||||
cmd.append(shlex_quote(source))
|
cmd.append(shlex_quote(source))
|
||||||
cmd.append(shlex_quote(dest))
|
cmd.append(shlex_quote(dest))
|
||||||
|
if quiet:
|
||||||
|
cmd.append('--quiet')
|
||||||
|
|
||||||
cmdstr = ' '.join(cmd)
|
cmdstr = ' '.join(cmd)
|
||||||
|
|
||||||
# If we are using password authentication, write the password into the pipe
|
# If we are using password authentication, write the password into the pipe
|
||||||
|
|
@ -634,9 +638,6 @@ def main():
|
||||||
else:
|
else:
|
||||||
(rc, out, err) = module.run_command(cmdstr)
|
(rc, out, err) = module.run_command(cmdstr)
|
||||||
|
|
||||||
if quiet:
|
|
||||||
cmd.append('--quiet')
|
|
||||||
|
|
||||||
if rc:
|
if rc:
|
||||||
return module.fail_json(msg=err, rc=rc, cmd=cmdstr)
|
return module.fail_json(msg=err, rc=rc, cmd=cmdstr)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue