Don't get missing file hash in `files.put` operation when `assume_exists=True`
@@ -866,6 +866,9 @@ def put(
if create_remote_dir:
yield from _create_remote_dir(state, host, dest, user, group)
+ if assume_exists and not os.path.isfile(local_file):
+ local_sum = None
+ else:
local_sum = get_file_sha1(src)
# No remote file, always upload and user/group/mode if supplied
