1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# File 'modules/dumps/manifests/rsync/common.pp', line 1
class dumps::rsync::common(
$user = undef,
$group = undef,
) {
ensure_packages('rsync')
file { '/etc/rsyncd.d':
ensure => 'directory',
}
file { '/etc/rsyncd.d/00-globalopts.conf':
ensure => 'present',
mode => '0444',
owner => 'root',
group => 'root',
content => template('dumps/rsync/rsyncd.conf.globalopts.erb'),
notify => Exec['update-rsyncd.conf'],
}
exec { 'update-rsyncd.conf':
command => '/bin/cat /etc/rsyncd.d/*.conf > /etc/rsyncd.conf',
refreshonly => true,
require => File['/etc/rsyncd.d'],
}
service { 'rsync':
ensure => running,
enable => true,
subscribe => [ Exec['update-rsyncd.conf'] ],
}
}
|