From 2d0e9cd75de7d3bcc32ca9079e82146dda1413f6 Mon Sep 17 00:00:00 2001 From: James Cammarata Date: Mon, 3 Feb 2014 12:54:52 -0600 Subject: [PATCH] Revert "Fix for issue 5739. The copy module does not delete directories it will only unlinks symlinks." This reverts commit b20dc4f57862885632381c2e4264db7094d13e2f. --- lib/ansible/runner/action_plugins/copy.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ansible/runner/action_plugins/copy.py b/lib/ansible/runner/action_plugins/copy.py index 194dc3604d..e1dce790b9 100644 --- a/lib/ansible/runner/action_plugins/copy.py +++ b/lib/ansible/runner/action_plugins/copy.py @@ -124,6 +124,8 @@ class ActionModule(object): diffs = [] module_result = {"changed": False} for source_full, source_rel in source_files: + # We need to get a new tmp path for each file, otherwise the copy module deletes the folder. + tmp = self.runner._make_tmp_path(conn) local_md5 = utils.md5(source_full) if local_md5 is None: