From 9313bf3e68b25fe7ad177258ede6208fee9021e8 Mon Sep 17 00:00:00 2001 From: Amin Vakil Date: Mon, 26 Apr 2021 10:58:27 +0430 Subject: [PATCH] Reorder if to address quidame suggestion --- plugins/modules/synchronize.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/modules/synchronize.py b/plugins/modules/synchronize.py index 5c4d50d..7faef18 100644 --- a/plugins/modules/synchronize.py +++ b/plugins/modules/synchronize.py @@ -462,9 +462,6 @@ def main(): rsync = module.get_bin_path(rsync, required=True) cmd = [rsync] - if delay_updates: - cmd.append('--delay_updates') - cmd.append('-F') _sshpass_pipe = None if rsync_password: try: @@ -475,6 +472,9 @@ def main(): ) _sshpass_pipe = os.pipe() cmd = ['sshpass', '-d' + to_native(_sshpass_pipe[0], errors='surrogate_or_strict')] + cmd + if delay_updates: + cmd.append('--delay_updates') + cmd.append('-F') if compress: cmd.append('--compress') if rsync_timeout: