mirror of
https://github.com/ansible-collections/ansible.posix.git
synced 2026-01-12 07:35:31 +01:00
Fix: moving conditional to correct place
This commit is contained in:
parent
112fe9e9d0
commit
afe4ec8334
1 changed files with 4 additions and 3 deletions
|
|
@ -189,6 +189,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.
|
||||||
|
|
@ -598,6 +599,9 @@ def main():
|
||||||
if '@' not in dest:
|
if '@' not in dest:
|
||||||
dest = os.path.expanduser(dest)
|
dest = os.path.expanduser(dest)
|
||||||
|
|
||||||
|
if quiet:
|
||||||
|
cmd.append('--quiet')
|
||||||
|
|
||||||
cmd.append(source)
|
cmd.append(source)
|
||||||
cmd.append(dest)
|
cmd.append(dest)
|
||||||
cmdstr = ' '.join(cmd)
|
cmdstr = ' '.join(cmd)
|
||||||
|
|
@ -619,9 +623,6 @@ def main():
|
||||||
else:
|
else:
|
||||||
(rc, out, err) = module.run_command(cmd)
|
(rc, out, err) = module.run_command(cmd)
|
||||||
|
|
||||||
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