]> git.donarmstrong.com Git - dsa-puppet.git/commitdiff
handle different binds
authorStephen Gran <steve@lobefin.net>
Sat, 28 Apr 2012 09:34:32 +0000 (10:34 +0100)
committerStephen Gran <steve@lobefin.net>
Sat, 28 Apr 2012 09:34:32 +0000 (10:34 +0100)
Signed-off-by: Stephen Gran <steve@lobefin.net>
modules/roles/manifests/backports_master.pp
modules/roles/manifests/ftp.pp
modules/roles/manifests/ftp_upload.pp
modules/roles/manifests/security_mirror.pp

index bce2fee27516e827eaa9a57a0be90ee81b3a40e8..507d0ff2ef2f5bb6057e470d173c620cba424ba8 100644 (file)
@@ -2,7 +2,24 @@ class roles::backports_master {
 
        include roles::backports_mirror
 
+       $bind = $::hostname ? {
+               default => '',
+       }
+
+       $bind6 = $::hostname ? {
+               default => '',
+       }
+
        vsftpd::site { 'backports':
-               source => 'puppet:///modules/roles/backports_master/vsftpd.conf'
+               source => 'puppet:///modules/roles/backports_master/vsftpd.conf',
+               bind   => $bind,
        }
+
+       if $bind6 {
+               vsftpd::site { 'security-v6':
+                       source => 'puppet:///modules/roles/security_mirror/vsftpd.conf',
+                       bind   => $bind6,
+               }
+       }
+
 }
index 27c4480b1ac60bd7d71105573adfc98dc139b39c..294cea36d12ec2ef8928bd70ab005ed36c318eb9 100644 (file)
@@ -1,5 +1,22 @@
 class roles::ftp {
+
+       $bind = $::hostname ? {
+               default => '',
+       }
+
+       $bind6 = $::hostname ? {
+               default => '',
+       }
+
        vsftpd::site { 'ftp':
-               source => 'puppet:///modules/roles/ftp/vsftpd.conf'
+               source => 'puppet:///modules/roles/ftp/vsftpd.conf',
+               bind   => $bind,
+       }
+
+       if $bind6 {
+               vsftpd::site { 'security-v6':
+                       source => 'puppet:///modules/roles/security_mirror/vsftpd.conf',
+                       bind   => $bind6,
+               }
        }
 }
index 3bccb3dbfd4ba050811908d321fcf27ea3301a27..8bdd2604908b48e81d5361d1a813c723dff80cc4 100644 (file)
@@ -1,5 +1,22 @@
 class roles::ftp_upload {
+
+       $bind = $::hostname ? {
+               default => '',
+       }
+
+       $bind6 = $::hostname ? {
+               default => '',
+       }
+
        vsftpd::site { 'ftp-upload':
-               source => 'puppet:///modules/roles/ftp_upload/vsftpd.conf'
+               source => 'puppet:///modules/roles/ftp_upload/vsftpd.conf',
+               bind   => $bind,
+       }
+
+       if $bind6 {
+               vsftpd::site { 'security-v6':
+                       source => 'puppet:///modules/roles/security_mirror/vsftpd.conf',
+                       bind   => $bind6,
+               }
        }
 }
index 66455c991f258d2487411eb367dce82f78bd9a19..5f59d26b1146fc1ccf16f9794732b00e36453b75 100644 (file)
@@ -5,7 +5,24 @@ class roles::security_mirror {
                config => 'puppet:///modules/roles/security_mirror/security.debian.org'
        }
 
+       $bind = $::hostname ? {
+               default => '',
+       }
+
+       $bind6 = $::hostname ? {
+               default => '',
+       }
+
        vsftpd::site { 'security':
-               source => 'puppet:///modules/roles/security_mirror/vsftpd.conf'
+               source => 'puppet:///modules/roles/security_mirror/vsftpd.conf',
+               bind   => $bind,
        }
+
+       if $bind6 {
+               vsftpd::site { 'security-v6':
+                       source => 'puppet:///modules/roles/security_mirror/vsftpd.conf',
+                       bind   => $bind6,
+               }
+       }
+
 }