From dd5d191d7a6985ff068ee458d6dd56c46273e6f8 Mon Sep 17 00:00:00 2001 From: Roman D Date: Thu, 20 Sep 2018 19:40:14 +0300 Subject: [PATCH] Clarified documentation for the unsafe_writes option (#27471) * Clarified documentation for the unsafe_writes option per #24449. --- lib/ansible/utils/module_docs_fragments/files.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/ansible/utils/module_docs_fragments/files.py b/lib/ansible/utils/module_docs_fragments/files.py index 4e95120f691..b18c86b9a69 100644 --- a/lib/ansible/utils/module_docs_fragments/files.py +++ b/lib/ansible/utils/module_docs_fragments/files.py @@ -57,11 +57,13 @@ options: default: "s0" unsafe_writes: description: - - Normally this module uses atomic operations to prevent data corruption or inconsistent reads from the target files, - sometimes systems are configured or just broken in ways that prevent this. One example are docker mounted files, - they cannot be updated atomically and can only be done in an unsafe manner. - - This boolean option allows ansible to fall back to unsafe methods of updating files for those cases in which you do - not have any other choice. Be aware that this is subject to race conditions and can lead to data corruption. + - By default this module uses atomic operations to prevent data + corruption or inconsistent reads from the target files, + but sometimes systems are configured or just broken in ways that prevent this. One example is docker mounted files, + which cannot be updated atomically from inside the container and can only be written in an unsafe manner. + - This option allows Ansible to fall back to unsafe methods of + updating files when atomic operations fail (however, it doesn't force Ansible to perform unsafe writes). + IMPORTANT! Unsafe writes are subject to race conditions and can lead to data corruption. type: bool default: 'no' version_added: "2.2"