``systemd``
===========

This module provides defined types to create systemd units. It automatically
takes care of reloading systemd when necessary, automatically generates correct
names for ``.mount`` units, etc.

The parameters of defined types are usually similar to the systemd option names
that they represent. Camel case (as used by systemd) is transformed to the
lowercase-with-underscore style usually used with Puppet, e.g. ``OnCalendar`` in
systemd becomes ``on_calendar``.


Parameters
----------

``default_target``
~~~~~~~~~~~~~~~~~~

The systemd default target, i.e. usually one of ``multi-user.target`` or
``graphical.target``.


Defined Types
-------------

All units support the following parameters for the ``[Unit]`` or ``[Install]``
sections:

- ``description``
- ``wanted_by``


``systemd::timer``
~~~~~~~~~~~~~~~~~~

Creates a timer unit.

Parameters:

- ``on_calendar``
- ``unit``


``systemd::mount``
~~~~~~~~~~~~~~~~~~

Creates a mount unit. The name of the unit file has to be (an encoded form of)
the mountpoint, which is automatically generated. See ``systemd.mount(5)`` for
details.

Parameters:

- ``what``
- ``where``
- ``options``


``systemd.service``
~~~~~~~~~~~~~~~~~~~

- ``type`` (default: ``simple``)
- ``exec_start``


Examples
--------

Defining a timer unit
~~~~~~~~~~~~~~~~~~~~~

Timer units integrate nicely with the remaining services. They can be managed
through ``systemctl(1)`` and their log messages can easily be accessed through
``journalctl -u xxxxx.timer``.

A timer unit needs a corresponding service unit which executes the actual
command.
