]> git.donarmstrong.com Git - dsa-puppet.git/commitdiff
try to do ipv6 binding for rsync
authorPeter Palfrader <peter@palfrader.org>
Mon, 24 Jun 2013 19:31:37 +0000 (21:31 +0200)
committerPeter Palfrader <peter@palfrader.org>
Mon, 24 Jun 2013 19:31:37 +0000 (21:31 +0200)
modules/roles/manifests/syncproxy.pp
modules/rsync/manifests/site.pp

index 7bd8fa04b426cce4bf52fd8867a0c5f24d0ad591..20c3320c6c061334cf46b35ffef728295bbac403 100644 (file)
@@ -5,6 +5,10 @@ class roles::syncproxy {
                        'milanollo' => '5.153.231.9',
                        default => ''
                }
+               bind6   => $::hostname ? {
+                       'milanollo' => '2001:41c8:1000:21::21:9',
+                       default => ''
+               }
        }
 
        file { '/etc/rsyncd':
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']
 }