Defined Type: systemd::override

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

Summary

helper resource to create systemd service overrides

Overview

SPDX-License-Identifier: Apache-2.0

Parameters:

  • unit (String[1])

    the name of the service to override

  • content (Optional[String[1]]) (defaults to: undef)

    the content of the systemd unit file

  • ensure (Wmflib::Ensure) (defaults to: present)

    the ensurable parameter

  • restart (Boolean) (defaults to: false)

    if true restart the service when the override file changes

  • source (Optional[Stdlib::Filesource]) (defaults to: undef)


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

define systemd::override (
    String[1]                    $unit,
    Optional[String[1]]          $content           = undef,
    Optional[Stdlib::Filesource] $source            = undef,
    Wmflib::Ensure               $ensure  = present,
    Boolean                      $restart = false,
) {
    systemd::unit { "${unit}-${title}":
        override_filename => $title,
        override          => true,
        *                 => wmflib::resource::dump_params(),
    }
}