Add systemd module, required by rabbitmq
[mirror/dsa-puppet.git] / 3rdparty / modules / systemd / manifests / tmpfiles.pp
diff --git a/3rdparty/modules/systemd/manifests/tmpfiles.pp b/3rdparty/modules/systemd/manifests/tmpfiles.pp
new file mode 100644 (file)
index 0000000..cad5371
--- /dev/null
@@ -0,0 +1,24 @@
+# Update the systemd temp files
+#
+# @api public
+#
+# @see systemd-tmpfiles(8)
+#
+# @param operations
+#   The operations to perform on the systemd tempfiles
+#
+#   * All operations may be combined but you'll probably only ever want to
+#     use ``create``
+#
+class systemd::tmpfiles (
+  Array[Enum['create','clean','remove']] $operations = ['create']
+) {
+
+  $_ops = join(prefix($operations, '--'), ' ')
+
+  exec { 'systemd-tmpfiles':
+    command     => "systemd-tmpfiles ${_ops}",
+    refreshonly => true,
+    path        => $::path,
+  }
+}