Omit duplicate passwd and group entries in syncuser overlay

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
Jonathon Anderson
2025-02-10 19:11:52 -07:00
parent a686ddb7ad
commit 21333482e6
10 changed files with 171 additions and 45 deletions

View File

@@ -161,6 +161,10 @@ all users on both the Warewulf server and from the image. To function
properly, ``wwctl image syncuser`` must have also been run on the image
image to synchronize its user and group IDs with those of the server.
If a ``PasswordlessRoot`` tag is set to "true", the overlay will also insert a
"passwordless" root entry. This can be particularly useful for accessing a
cluster node when its network interface is not properly configured.
ignition
--------

View File

@@ -135,13 +135,13 @@ The following template will create a file called
</interface>
{{ end -}}
Special Commands
----------------
Special Functions
-----------------
Include
^^^^^^^
A file from the host can be include with following template
A file from the host can be included with following template
.. code-block::
@@ -228,6 +228,25 @@ readlink
Evaluates the soft link on the Warewulf server and returns the target.
UniqueField
^^^^^^^^^^^
UniqueField returns a filtered version of a multi-line input string. input is
expected to be a field-separated format with one record per line (terminated by
`\n`). Order of lines is preserved, with the first matching line taking
precedence.
For example, the following template snippet has been used in the ``syncuser`` overlay
to generate a combined ``/etc/passwd``.
.. code-block::
{{
printf "%s\n%s"
(IncludeFrom $.ImageName "/etc/passwd" | trim)
(Include (printf "%s/%s" .Paths.Sysconfdir "passwd") | trim)
| UniqueField ":" 0 | trim
}}
Node specific files
-------------------