From 2db3f290ba81a0be7e1145c35aaeecfb431ebcbd Mon Sep 17 00:00:00 2001 From: James Cammarata Date: Tue, 23 Feb 2016 16:29:57 -0500 Subject: [PATCH] Fix logic error when copying files recursively to a directory --- lib/ansible/plugins/action/copy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/plugins/action/copy.py b/lib/ansible/plugins/action/copy.py index f9cd4c59030..c50076c5430 100644 --- a/lib/ansible/plugins/action/copy.py +++ b/lib/ansible/plugins/action/copy.py @@ -184,7 +184,7 @@ class ActionModule(ActionBase): dest_file = self._connection._shell.join_path(dest, source_rel) dest_status = self._execute_remote_stat(dest_file, all_vars=task_vars, follow=follow) - if not dest_status['exists'] and not force: + if dest_status['exists'] and not force: # remote_file does not exist so continue to next iteration. continue