Skip to content
Snippets Groups Projects
Commit c7f75954 authored by Thomas Bellman's avatar Thomas Bellman
Browse files

Support per-path parameters in systemd::tmpfiles.

This adds the ability to give per-path parameters when configuring
systemd-tmpfiles(8).  The $paths parameter to systemd::tmpfiles can
now be a hash of hashes, mapping from paths to hashes of parameters
overriding the parameters given directly to systemd::tmpfiles, e.g.

    systemd::tmpfiles {
        'smurf':
            type => 'd', mode => '0750', owner => 'gargamel',
            paths => {
                '/run/alldefaults' => {},
                '/run/file' => { 'type' => 'f', 'group' => 'smurfs' },
            };
    }

which will generate

    d  /run/alldefaults  0750  gargamel  -       -
    f  /run/file         0750  gargamel  smurfs  -

in /etc/tmpfiles.d/smurf.conf.

The original API, where you specify the $paths parameter as a simple
list of paths, or just a single string, is still available, as that is
easier to use for many simple cases.
parent f856099e
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment