.\" Man page generated from reStructuredText. . .TH "CDIST-TYPE__SYSTEMD_UNIT" "7" "Jun 23, 2019" "5.1.2" "cdist" . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH NAME .sp cdist\-type__systemd_unit \- Install a systemd unit .SH DESCRIPTION .sp This type manages systemd units in \fB/etc/systemd/system/\fP\&. It can install, enable and start a systemd unit. This is particularly useful on systems which take advantage of systemd heavily (e.g., CoreOS). For more information about systemd units, see SYSTEMD.UNIT(5). .SH REQUIRED PARAMETERS .sp None. .SH OPTIONAL PARAMETERS .INDENT 0.0 .TP .B enablement\-state \(aqenabled\(aq, \(aqdisabled\(aq or \(aqmasked\(aq, where: .INDENT 7.0 .TP .B enabled enables the unit .TP .B disabled disables the unit .TP .B masked masks the unit .UNINDENT .TP .B source Path to the config file. If source is \(aq\-\(aq (dash), take what was written to stdin as the config file content. .TP .B state \(aqpresent\(aq or \(aqabsent\(aq, defaults to \(aqpresent\(aq where: .INDENT 7.0 .TP .B present the unit (or its mask) is installed .TP .B absent The unit is stopped, disabled and uninstalled. If the unit was masked, the mask is removed. .UNINDENT .UNINDENT .SH BOOLEAN PARAMETERS .INDENT 0.0 .TP .B restart Start the unit if it was inactive. Restart the unit if the unit file changed. Stop the unit if new \fBenablement\-state\fP is \fBmasked\fP\&. .UNINDENT .SH MESSAGES .sp None. .SH EXAMPLES .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C # Installs, enables and starts foobar.service __systemd_unit foobar.service \e \-\-source "${__manifest}/files/foobar.service" \e \-\-enablement\-state enabled \e \-\-restart # Disables the unit __systemd_unit foobar.service \-\-enablement\-state disabled # Stops, disables and uninstalls foobar.service __systemd_unit foobar.service \-\-state absent .ft P .fi .UNINDENT .UNINDENT .SH AUTHORS .sp Ľubomír Kučera .SH COPYING .sp Copyright (C) 2017 Ľubomír Kučera. You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. .SH COPYRIGHT ungleich GmbH 2019 .\" Generated by docutils manpage writer. .