CDIST-TYPE__SYSTEMD_SERVICE(7) | cdist | CDIST-TYPE__SYSTEMD_SERVICE(7) |
cdist-type__systemd_service - Controls a systemd service state
This type controls systemd services to define a state of the service, or an action like reloading or restarting. It is useful to reload a service after configuration applied or shutdown one service.
The activation or deactivation is out of scope. Look for the cdist-type__systemd_util(7) type instead.
None.
Aborts in following cases:
systemd or the service does not exist
# service must run __systemd_service nginx # service must stopped __systemd_service sshd \
--state stopped # restart the service __systemd_service apache2 \
--action restart # makes sure the service exist with an alternative name __systemd_service foo \
--name sshd # reload the service for a modified configuration file # only reloads the service if the file really changed require="__file/etc/foo.conf" __systemd_service foo \
--action reload --if-required
Matthias Stecher <matthiasstecher at gmx.de>
Copyright (C) 2020 Matthias Stecher. 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.
ungleich GmbH 2021
January 15, 2023 | 7.0.0 |