1 |
class rsyncd { |
2 |
|
3 |
package { rsync: |
4 |
ensure => installed |
5 |
} |
6 |
package { xinetd: |
7 |
ensure => installed |
8 |
} |
9 |
|
10 |
service { xinetd: |
11 |
ensure => running, |
12 |
path => "/etc/init.d/xinetd", |
13 |
subscribe => [ Package["xinetd"], File["xinetd"] ] |
14 |
} |
15 |
|
16 |
file { "rsync": |
17 |
path => "/etc/xinetd.d/rsync", |
18 |
ensure => present, |
19 |
owner => root, |
20 |
group => root, |
21 |
mode => 644, |
22 |
require => "xinetd", |
23 |
content => template("rsyncd/xinetd") |
24 |
} |
25 |
|
26 |
file { "rsyncd.conf": |
27 |
path => "/etc/rsyncd.conf", |
28 |
ensure => present, |
29 |
owner => root, |
30 |
group => root, |
31 |
mode => 644, |
32 |
require => Package["rsync"], |
33 |
content => template("rsyncd/rsyncd.conf") |
34 |
} |
35 |
} |