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 bce2fee..507d0ff 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 27c4480..294cea3 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 3bccb3d..8bdd260 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 66455c9..5f59d26 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,
+               }
+       }
+
 }