new file::files feature

This commit is contained in:
buchel_k committed 2025-06-24 16:46:42 +02:00
1 parent bd55c710f6
commit 9ae95b1e54
1 file changed
+22
@@ -60,6 +60,28 @@ files::files:
hello world
this is a test
```
Binary files you may provide with base64 encoding:
```
base64 < $FILE_PATH
```
and using the `base64_content` key:
```
files::files:
/test/zero:
base64_content: AAAAAAAAAAAAAA==
```
If the binary file has been encrypted with eyaml, then this detour is not needed, you can set the encrypted String directly with the `content` key.
It is also possible to provide files directly from your Hiera data repository if you configure the path of the desired file within that repo with the `hiera_file` key:
```
files::files:
/etc/logo.png:
hiera_file: files/logo.png
```
Here none of the usual decryption, inheritence or interpolation functionality of Hiera is applied, the file is just copied as is.
Additional file parameters:
- `owner`: file owner (optional, default `root`)
- `group`: file owner (optional, default `root`)