+ $service_file = "/etc/systemd/system/rsyncd-${name}@.service"
+ $socket_file = "/etc/systemd/system/rsyncd-${name}.socket"
+ $systemd_service = "rsyncd-${name}.socket"
+
+ # if we enable the service, we want the files before the service.
+ # if we remove the service, we want the service disabled before the files
+ # go away.
+ $service_subscribe = $ensure ? {
+ present => [
+ File[$service_file],
+ File[$socket_file],
+ ],
+ default => [],
+ }
+ $service_before = $ensure ? {
+ present => [],
+ default => [
+ File[$service_file],
+ File[$socket_file],
+ ],
+ }
+
+ file { $service_file: