]> git.donarmstrong.com Git - dsa-puppet.git/blobdiff - modules/rsync/manifests/site.pp
try to do ipv6 binding for rsync
[dsa-puppet.git] / modules / rsync / manifests / site.pp
index bb2ee1446170260dab55fa5bd34b38e07e8f6196..c534b372bf1a38a51ec73dfb9cea8fcd1692df94 100644 (file)
@@ -1,5 +1,6 @@
 define rsync::site (
        $bind='',
+       $bind6='',
        $source='',
        $content='',
        $fname='',
@@ -48,5 +49,21 @@ define rsync::site (
                require     => File[$fname_real]
        }
 
+       if $bind6 != '' {
+               if $bind == '' {
+                       fail("Cannot listen on * and a specific ipv6 address")
+               }
+               xinetd::service { "rsync-${name}6":
+                       bind        => $bind6,
+                       id          => "${name}-rsync6",
+                       server      => '/usr/bin/rsync',
+                       port        => 'rsync',
+                       server_args => "--daemon --config=${fname_real}",
+                       ferm        => false,
+                       instances   => $max_clients,
+                       require     => File[$fname_real]
+               }
+       }
+
        Service['rsync']->Service['xinetd']
 }