From db7f690e78e841650e026edc9f59d3aa5b07c11d Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Mon, 24 Jun 2013 21:31:37 +0200 Subject: [PATCH] try to do ipv6 binding for rsync --- modules/roles/manifests/syncproxy.pp | 4 ++++ modules/rsync/manifests/site.pp | 17 +++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/modules/roles/manifests/syncproxy.pp b/modules/roles/manifests/syncproxy.pp index 7bd8fa04..20c3320c 100644 --- a/modules/roles/manifests/syncproxy.pp +++ b/modules/roles/manifests/syncproxy.pp @@ -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': diff --git a/modules/rsync/manifests/site.pp b/modules/rsync/manifests/site.pp index bb2ee144..c534b372 100644 --- a/modules/rsync/manifests/site.pp +++ b/modules/rsync/manifests/site.pp @@ -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'] } -- 2.39.2