diff --git a/library/copy b/library/copy index f33f3910d5..d8d5410b8a 100644 --- a/library/copy +++ b/library/copy @@ -105,8 +105,8 @@ def main(): md5sum_dest = None if os.path.exists(dest): - # if not force: - # module.exit_json(msg="file already exists and force is set (%s)" % force, src=src, dest=dest, changed=False) + if not force: + module.exit_json(msg="file already exists", src=src, dest=dest, changed=False) if (os.path.isdir(dest)): basename = os.path.basename(src) dest = os.path.join(dest, basename)