16 $fname_real = "/etc/rsyncd-${name}.conf"
22 default: { fail ( "Invald ensure `${ensure}' for ${name}" ) }
25 if ($source and $content) {
26 fail ( "Can't define both source and content for ${name}" )
40 fail ( "Can't find config for ${name}" )
43 xinetd::service { "rsync-${name}":
45 id => "${name}-rsync",
46 server => '/usr/bin/rsync',
48 server_args => "--daemon --config=${fname_real}",
50 instances => $max_clients,
51 require => File[$fname_real]
56 fail("Cannot listen on * and a specific ipv6 address")
58 xinetd::service { "rsync-${name}6":
60 id => "${name}-rsync6",
61 server => '/usr/bin/rsync',
63 server_args => "--daemon --config=${fname_real}",
65 instances => $max_clients,
66 require => File[$fname_real]
71 file { "/etc/rsyncd-${name}-stunnel.conf":
72 content => template('rsync/rsyncd-stunnel.conf.erb')
74 @ferm::rule { "rsync-${name}-ssl":
76 description => 'Allow rsync access',
77 rule => "&SERVICE(tcp, $sslport)",
79 xinetd::service { "rsync-${name}-ssl":
81 id => "rsync-${name}-ssl",
82 server => '/usr/bin/stunnel4',
83 server_args => "/etc/rsyncd-${name}-stunnel.conf",
84 service => "rsync-ssl",
88 instances => $max_clients,
89 require => File["/etc/rsyncd-${name}-stunnel.conf"],
92 xinetd::service { "rsync-${name}-ssl6":
94 id => "rsync-${name}-ssl6",
95 server => '/usr/bin/stunnel4',
96 server_args => "/etc/rsyncd-${name}-stunnel.conf",
97 service => "rsync-ssl",
101 instances => $max_clients,
102 require => File["/etc/rsyncd-${name}-stunnel.conf"],
107 Service['rsync']->Service['xinetd']