From b70f11079e6d4264ff9a8c12089945f57d903e28 Mon Sep 17 00:00:00 2001 From: Adrian Wilkins Date: Tue, 28 Apr 2020 16:55:34 +0100 Subject: Add docs about creating parent folders (#330) Clarify in documentation that write_files will create parent folders for paths that do not already exist. This obfuscates what the problem is when people erroneously create files in /tmp despite the warnings in the documentation not to do so. People naturally assume that their file is absent because the parent folder did not exist for it to be created in, causing them to add a runcmd block to create the folder, even though execution order means that this will not occur until after write_files have all finished. --- cloudinit/config/cc_write_files.py | 1 + 1 file changed, 1 insertion(+) (limited to 'cloudinit/config') diff --git a/cloudinit/config/cc_write_files.py b/cloudinit/config/cc_write_files.py index 16ea80e2..204cbfd6 100644 --- a/cloudinit/config/cc_write_files.py +++ b/cloudinit/config/cc_write_files.py @@ -43,6 +43,7 @@ schema = { 'title': 'write arbitrary files', 'description': dedent("""\ Write out arbitrary content to files, optionally setting permissions. + Parent folders in the path are created if absent. Content can be specified in plain text or binary. Data encoded with either base64 or binary gzip data can be specified and will be decoded before being written. For empty file creation, content can be omitted. -- cgit v1.2.3