From f5961f9ecfe86f9ec5d6026e0b8d369b7abc511e Mon Sep 17 00:00:00 2001 From: Petros Moisiadis Date: Sun, 28 Sep 2014 13:24:47 +0300 Subject: [PATCH] synchronize: use a single -F instead of -FF This small change corrects behavior when one uses an .rsync-filter file to exclude some paths from both being transferred and being deleted, so that these excluded paths can be handled separately with different tasks (e.g. in order to deploy the excluded paths independently from the rest paths and notify handlers appropriately). The problem with the double -FF option is that it excludes the .rsync-filter file from being transferred to the receiver. However, deletions are done on the side of the receiver, so it is absolutely necessary the .rsync-filter file to be transferred to the receiver, so that the receiver knows what files to delete and what not to delete. --- lib/ansible/modules/files/synchronize.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/files/synchronize.py b/lib/ansible/modules/files/synchronize.py index 7f706384bc..821ad9307e 100644 --- a/lib/ansible/modules/files/synchronize.py +++ b/lib/ansible/modules/files/synchronize.py @@ -255,7 +255,7 @@ def main(): group = module.params['group'] rsync_opts = module.params['rsync_opts'] - cmd = '%s --delay-updates -FF' % rsync + cmd = '%s --delay-updates -F' % rsync if compress: cmd = cmd + ' --compress' if rsync_timeout: