systemd-machine-tag@.service — Add a machine tag to the host
systemd-machine-tag@.service
systemd-machine-tag@ is a service
template that adds the machine tag TAG.serviceTAG (taken from the instance name) to the
host's list of machine tags. Whenever an instance of this template is pulled in, the corresponding tag is
added; the operation is idempotent, so pulling it in repeatedly has no further effect.
The primary use of this template is automatic, hardware-driven tagging: the
SYSTEMD_MACHINE_TAG udev property, when set on a device, causes the matching instance
of this template to be pulled in (via SYSTEMD_WANTS=), so that plugging in or
detecting a specific device automatically tags the host. See
systemd.device(5) for
details on the SYSTEMD_WANTS= mechanism.
Machine tags may be inspected and edited with the tags verb of
hostnamectl(1), and are
stored in the TAGS= field of
machine-info(5). Each
tag must be 1…255 characters long and consist only of ASCII alphanumeric characters,
"-" and ".".