Defined Type: systemd::unmask

Defined in:
modules/systemd/manifests/unmask.pp

Summary

Use 'systemctl unmask $title' to undo the effects of systemctl mask so that the given unit can be started again.

Overview

Examples:

systemd::unmask { 'trafficserver-backend.service': }

Parameters:

  • unit (Systemd::Unit::Name) (defaults to: $title)

    the unit name to unmask

  • refreshonly (Boolean) (defaults to: false)

    set refreshonly value



10
11
12
13
14
15
16
17
18
19
# File 'modules/systemd/manifests/unmask.pp', line 10

define systemd::unmask (
    Systemd::Unit::Name $unit        = $title,
    Boolean             $refreshonly = false,
) {
    exec { "unmask_${unit}":
        command     => "/bin/systemctl unmask ${unit}",
        onlyif      => "/bin/readlink -f /etc/systemd/system/${unit} | grep -q /dev/null",
        refreshonly => $refreshonly,
    }
}