aboutsummaryrefslogtreecommitdiff
path: root/libexec/nuageinit/nuageinit.7
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2025-06-26 11:32:07 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2025-07-08 14:31:47 +0000
commitd056f72c358b4f962b09f5c752567ff543fe87c6 (patch)
tree919c6b63f984bf60545c286a78e391955a90628d /libexec/nuageinit/nuageinit.7
parentee1fd6b260c04560f424e4dc974b966b41af8dba (diff)
nuageinit: implement write_files
write_files is a list of files that should be created at the first boot each file content can be either plain text or encoded in base64 (note that cloudinit specify that gzip is supported, but we do not support it yet.) All other specifier from cloudinit should work: by default all files will juste overwrite exesiting files except if "append" is set to true, permissions, ownership can be specified. The files are create before packages are being installed and user created. if "defer" is set to true then the file is being created after packages installation and package manupulation. This feature is requested for KDE's CI. (cherry picked from commit 19a7ea3cc4de5af80e2913fda70bd65ad72835c0)
Diffstat (limited to 'libexec/nuageinit/nuageinit.7')
-rw-r--r--libexec/nuageinit/nuageinit.738
1 files changed, 37 insertions, 1 deletions
diff --git a/libexec/nuageinit/nuageinit.7 b/libexec/nuageinit/nuageinit.7
index 1d2f83fe62e0..3bb440ebac95 100644
--- a/libexec/nuageinit/nuageinit.7
+++ b/libexec/nuageinit/nuageinit.7
@@ -2,7 +2,7 @@
.\"
.\" Copyright (c) 2025 Baptiste Daroussin <bapt@FreeBSD.org>
.\"
-.Dd June 16, 2025
+.Dd June 26, 2025
.Dt NUAGEINIT 7
.Os
.Sh NAME
@@ -239,6 +239,42 @@ where x is a number, then the password is considered encrypted,
otherwise the password is considered plaintext.
.El
.El
+.It Ic write_files
+An array of objects representing files to be created at first boot.
+The files are being created before the installation of any packages
+and the creation of the users.
+The only mandatory field is:
+.Ic path .
+It accepts the following keys for each objects:
+.Bl -tag -width "permissions"
+.It Ic content
+The content to be written to the file.
+If this key is not existing then an empty file will be created.
+.It Ic encoding
+Specifiy the encoding used for content.
+If not specified, then plain text is considered.
+Only
+.Ar b64
+and
+.Ar base64
+are supported for now.
+.It Ic path
+The path of the file to be created.
+.Pq Note intermerdiary directories will not be created .
+.It Ic permissions
+A string representing the permission of the file in octal.
+.It Ic owner
+A string representing the owner, two forms are possible:
+.Ar user
+or
+.Ar user:group .
+.It Ic append
+A boolean to specify the content should be appended to the file if the file
+exists.
+.It Ic defer
+A boolean to specify that the files should be created after the packages are
+installed and the users are created.
+.El
.El
.Sh EXAMPLES
Here is an example of a YAML configuration for