11 $fname_real_rsync = "/etc/rsyncd-${name}.conf"
12 $fname_real_stunnel = "/etc/rsyncd-${name}-stunnel.conf"
16 default: { fail ( "Invald ensure `${ensure}' for ${name}" ) }
19 $ensure_service = $ensure ? {
24 $ensure_enable = $ensure ? {
29 file { $fname_real_rsync:
38 file { "/etc/systemd/system/rsyncd-${name}@.service":
40 content => template('rsync/systemd-rsyncd.service.erb'),
44 require => File[$fname_real_rsync],
45 notify => Exec['systemctl daemon-reload'],
48 file { "/etc/systemd/system/rsyncd-${name}.socket":
50 content => template('rsync/systemd-rsyncd.socket.erb'),
55 Exec['systemctl daemon-reload'],
56 Service["rsyncd-${name}.socket"],
60 service { "rsyncd-${name}.socket":
61 ensure => $ensure_service,
62 enable => $ensure_enable,
64 Exec['systemctl daemon-reload'],
65 File["/etc/systemd/system/rsyncd-${name}@.service"],
66 File["/etc/systemd/system/rsyncd-${name}.socket"],
72 file { $fname_real_stunnel:
74 content => template('rsync/systemd-rsyncd-stunnel.conf.erb'),
78 require => File["/etc/ssl/debian/certs/${sslname}.crt-chained"],
81 file { "/etc/systemd/system/rsyncd-${name}-stunnel@.service":
83 content => template('rsync/systemd-rsyncd-stunnel.service.erb'),
87 require => File[$fname_real_stunnel],
88 notify => Exec['systemctl daemon-reload'],
91 file { "/etc/systemd/system/rsyncd-${name}-stunnel.socket":
93 content => template('rsync/systemd-rsyncd-stunnel.socket.erb'),
98 Exec['systemctl daemon-reload'],
99 Service["rsyncd-${name}-stunnel.socket"]
103 service { "rsyncd-${name}-stunnel.socket":
104 ensure => $ensure_service,
105 enable => $ensure_enable,
107 Exec['systemctl daemon-reload'],
108 File["/etc/systemd/system/rsyncd-${name}-stunnel@.service"],
109 File["/etc/systemd/system/rsyncd-${name}-stunnel.socket"],
110 Service["rsyncd-${name}.socket"],
115 @ferm::rule { "rsync-${name}-ssl":
116 domain => '(ip ip6)',
117 description => 'Allow rsync access',
118 rule => '&SERVICE(tcp, 1873)',
121 dnsextras::tlsa_record{ "tlsa-${sslname}-1873":
122 zone => 'debian.org',
124 "/etc/puppet/modules/ssl/files/servicecerts/${sslname}.crt",
125 "/etc/puppet/modules/ssl/files/from-letsencrypt/${sslname}.crt",
128 hostname => $sslname,