Do not copy file if running on check mode

This commit is contained in:
Keisuke Kamada 2016-06-17 02:19:52 +09:00 committed by Matt Clay
parent 0c7ec1e860
commit 259c4b31fb

View file

@ -301,6 +301,7 @@ def main():
backup_file = None backup_file = None
if checksum_src != checksum_dest or os.path.islink(dest): if checksum_src != checksum_dest or os.path.islink(dest):
if not module.check_mode:
try: try:
if backup: if backup:
if os.path.exists(dest): if os.path.exists(dest):