Defined Type: systemd::tmpfile
- Defined in:
- manifests/tmpfile.pp
Overview
Creates a systemd tmpfile
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'manifests/tmpfile.pp', line 26
define systemd::tmpfile (
Enum['present', 'absent', 'file'] $ensure = 'file',
Systemd::Dropin $filename = $name,
Stdlib::Absolutepath $path = '/etc/tmpfiles.d',
Optional[String] $content = undef,
Optional[String] $source = undef,
) {
include systemd::tmpfiles
$_tmp_file_ensure = $ensure ? {
'present' => 'file',
default => $ensure,
}
file { "${path}/${filename}":
ensure => $_tmp_file_ensure,
content => $content,
source => $source,
owner => 'root',
group => 'root',
mode => '0444',
notify => Class['systemd::tmpfiles'],
}
}
|