From 39e080753dad0998582af7ec4b0fd4511ef39d01 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Tue, 10 Sep 2019 09:30:58 +0200 Subject: [PATCH] Revert "rsync::site dependency cleanup, part 1" This reverts commit e18adfd6c665a99d3e5cde12b9cac516c39bda6b. The commit contained unrelated changes. Will re-commit the relevant ones soon. --- .../roles/templates/snapshot/rsyncd.conf.erb | 32 +++++++++++++++++++ modules/rsync/manifests/site.pp | 9 ++++-- 2 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 modules/roles/templates/snapshot/rsyncd.conf.erb diff --git a/modules/roles/templates/snapshot/rsyncd.conf.erb b/modules/roles/templates/snapshot/rsyncd.conf.erb new file mode 100644 index 000000000..67564c93a --- /dev/null +++ b/modules/roles/templates/snapshot/rsyncd.conf.erb @@ -0,0 +1,32 @@ +uid = nobody +gid = nogroup +syslog facility = daemon +socket options = SO_KEEPALIVE +reverse lookup = false +timeout = 7200 +log file = /var/log/rsyncd/rsyncd.log + +[snapshot-farm-1] + path = /storage/snapshot-farm-1 + read only = true + list = false +[snapshot-farm-2] + path = /storage/snapshot-farm-2 + read only = true + list = false +[snapshot-farm-3] + path = /storage/snapshot-farm-3 + read only = true + list = false +[snapshot-farm-4] + path = /storage/snapshot-farm-4 + read only = true + list = false +[snapshot-farm-09] + path = /storage/snapshot-farm-09 + read only = true + list = false +[snapshot-farm-10] + path = /storage/snapshot-farm-10 + read only = true + list = false diff --git a/modules/rsync/manifests/site.pp b/modules/rsync/manifests/site.pp index 45836dfff..c762d6d37 100644 --- a/modules/rsync/manifests/site.pp +++ b/modules/rsync/manifests/site.pp @@ -46,14 +46,17 @@ define rsync::site ( owner => 'root', group => 'root', mode => '0444', - notify => Exec['systemctl daemon-reload'], + notify => [ + Exec['systemctl daemon-reload'], + Service["rsyncd-${name}.socket"], + ], } service { "rsyncd-${name}.socket": ensure => $ensure_service, enable => $ensure_enable, - notify => Exec['systemctl daemon-reload'], - subscribe => [ + require => [ + Exec['systemctl daemon-reload'], File["/etc/systemd/system/rsyncd-${name}@.service"], File["/etc/systemd/system/rsyncd-${name}.socket"], ], -- 2.20.1