summaryrefslogtreecommitdiff
path: root/puppet/modules/systemd/manifests/unit_file.pp
blob: 94bc845bf0f70588f323ef0deea2e34d5d61cbf8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# -- Define: systemd::unit_file
# Creates a unit file and reloads systemd
define systemd::unit_file(
  $ensure = file,
  $path = '/etc/systemd/system',
  $content = undef,
  $source = undef,
  $target = undef,
) {
  include ::systemd

  file { "${path}/${title}":
    ensure  => $ensure,
    content => $content,
    source  => $source,
    target  => $target,
    owner   => 'root',
    group   => 'root',
    mode    => '0444',
    notify  => Exec['systemctl-daemon-reload'],
  }
}