make a hiera setting for mirror base directory (/srv/mirrors)
[mirror/dsa-puppet.git] / modules / roles / manifests / ports_mirror.pp
index 80ca8b5..65a1ad9 100644 (file)
@@ -1,6 +1,10 @@
 class roles::ports_mirror {
        include roles::archvsync_base
 
+       $mirror_basedir_prefix = hiera('role_config__mirrors.mirror_basedir_prefix')
+       $archive_root = "${mirror_basedir_prefix}debian-ports"
+       $archive_cd_root = "${mirror_basedir_prefix}debian-ports-cd"
+
        $vhost_listen = $::hostname ? {
                klecker    => '130.89.148.14:80 [2001:610:1908:b000::148:14]:80 [2001:67c:2564:a119::148:14]:80',
                mirror-isc => '149.20.4.15:80 [2001:4f8:1:c::15]:80',
@@ -11,12 +15,6 @@ class roles::ports_mirror {
                mirror-isc => '149.20.4.15',
                default    => undef,
        }
-       $archive_root = $::hostname ? {
-               default    => '/srv/mirrors/debian-ports',
-       }
-       $archive_cd_root = $::hostname ? {
-               default    => '/srv/mirrors/debian-ports-cd',
-       }
 
        apache2::site { '010-ftp.ports.debian.org':
                site   => 'ftp.ports.debian.org',