diff --git a/products/storage/helpers/ansible/object_template.erb b/products/storage/helpers/ansible/object_template.erb index 2b9d1b01c66b..3992105fe9dd 100644 --- a/products/storage/helpers/ansible/object_template.erb +++ b/products/storage/helpers/ansible/object_template.erb @@ -63,7 +63,7 @@ def main(): module.fail_json(msg="File does not exist on disk") # Check if we'll be overwriting files. - if not module.params['overwrite']: + if remote_object and not module.params['overwrite']: remote_object['changed'] = False if module.params['action'] == 'download' and local_file_exists: # If files differ, throw an error