31 lines
1.0 KiB
Markdown
31 lines
1.0 KiB
Markdown
# systemd-tmpfiles
|
|
|
|
[`systemd-tmpfiles`](https://www.freedesktop.org/software/systemd/man/latest/systemd-tmpfiles.html) can be used to create, delete, and clean up files and directories.
|
|
The system-wide configuration is in [`/etc/tmpfiles.d/*.conf`](https://www.freedesktop.org/software/systemd/man/latest/tmpfiles.d.html).
|
|
|
|
|
|
## Hiera Configuration
|
|
|
|
In Hiera below `profile::tmpfiles:` you can set several use cases (here `podman`) with individual configuration at `content` which contains the full configuration as documented in [`tmpfiles.d(5)`](https://www.freedesktop.org/software/systemd/man/latest/tmpfiles.d.html):
|
|
|
|
```
|
|
profile::tmpfiles:
|
|
podman:
|
|
content: |
|
|
# This file is distributed by Puppet: profile::tmpfiles
|
|
# See tmpfiles.d(5) for details
|
|
|
|
# Remove podman temporary directories on each boot
|
|
# https://github.com/containers/podman/discussions/23193
|
|
R! /tmp/containers-user-*
|
|
R! /tmp/podman-run-*
|
|
```
|
|
|
|
To undo above configuration requires
|
|
|
|
```
|
|
profile::tmpfiles:
|
|
podman:
|
|
ensure: absent
|
|
```
|