- augeas >= 0.4.0
- puppet >= 0.24.7 (which includes native augeas type)
- this file (at least while it's not part of puppet), which fixes issue #1835: http://github.com/bkearney/puppet/tree/e431fee6de4c45fb85225d5aaff412ea0763d06f/lib/puppet/provider/augeas/augeas.rb
package { ["rsync", "xinetd"]: ensure => present }
service { "xinetd": ensure => running }
include rsyncd
$password = generate("/usr/bin/pwgen", 8, 1)
file { "/backup-mysql":
ensure => directory,
mode => 0775,
owner => "dba",
group => "dba",
}
file { "/home/dba/rsyncd.secret":
content => "backup:${password}",
replace => no,
mode => 0460,
owner=> "root",
group => "dba",
require => User["dba"],
}
rsyncd::export { "backup":
path => "/backup-mysql",
chroot => true,
readonly => true,
uid => "dba",
gid => "dba",
users => "backup",
secrets => "/home/dba/rsyncd.secret",
allow => "192.168.0.0/24",
require => [File["/backup-mysql"], File["/home/dba/rsyncd.secret"]],
prexferexec => "/home/dba/bin/pre-exec.sh",
postxferexec => "/home/dba/bin/post-exec.sh",
incomingchmod => "go=-w,+X",
logfile => '/var/log/rsyncd.test.log',
}