aboutsummaryrefslogtreecommitdiff
path: root/manifests/renew/systemd/setup.pp
blob: 5839efc1bd03ad356fef7a49de255a991574513c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Handles renewal certificates through systemd timers
# @param service_name Target name of the service file
# @param service_path Where the service file should be installed
# @api private
class letsencrypt::renew::systemd::setup (
  String $service_name = 'letsencrypt-renew',
  String $service_path = '/etc/systemd/system',
) {
  file { "${service_path}/${service_name}@.service":
    source => "puppet:///modules/${module_name}/letsencrypt-renew.service",
    notify => Exec['systemctl daemon-reload'],
  }

  file { "${service_path}/${service_name}@.timer":
    source => "puppet:///modules/${module_name}/letsencrypt-renew.timer",
    notify => Exec['systemctl daemon-reload'],
  }

  exec { 'systemctl daemon-reload':
    refreshonly => true,
    provider    => shell,
  }
}