]> git.donarmstrong.com Git - dsa-puppet.git/blobdiff - modules/rsync/manifests/site.pp
variable assignment does not clone string...
[dsa-puppet.git] / modules / rsync / manifests / site.pp
index 21b56639442d4d33c2f803e12b3bb522b18ae76b..c534b372bf1a38a51ec73dfb9cea8fcd1692df94 100644 (file)
@@ -1,5 +1,6 @@
 define rsync::site (
        $bind='',
+       $bind6='',
        $source='',
        $content='',
        $fname='',
@@ -40,13 +41,29 @@ define rsync::site (
        xinetd::service { "rsync-${name}":
                bind        => $bind,
                id          => "${name}-rsync",
-               server      => '/usr/sbin/rsyncd',
+               server      => '/usr/bin/rsync',
                port        => 'rsync',
-               server_args => $fname_real,
+               server_args => "--daemon --config=${fname_real}",
                ferm        => false,
                instances   => $max_clients,
                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']
 }