whitespace/quoting: modules/roles/manifests/*mirror (make lint happy)
authorPeter Palfrader <peter@palfrader.org>
Sat, 21 Sep 2019 10:31:28 +0000 (12:31 +0200)
committerPeter Palfrader <peter@palfrader.org>
Sat, 21 Sep 2019 10:31:28 +0000 (12:31 +0200)
modules/roles/manifests/debian_mirror.pp
modules/roles/manifests/debug_mirror.pp
modules/roles/manifests/historical_mirror.pp
modules/roles/manifests/security_mirror.pp

index 46eb1ac..2484d49 100644 (file)
@@ -1,43 +1,43 @@
 class roles::debian_mirror {
-       include roles::archvsync_base
+  include roles::archvsync_base
 
-       $mirror_basedir_prefix = hiera('role_config__mirrors.mirror_basedir_prefix')
-       $archive_root = "${mirror_basedir_prefix}debian"
-       $listen_addresses = hiera('roles.debian_mirror')
-               .dig($::fqdn, 'listen-addresses')
-               .then |$a| { $a + [ '127.0.0.1:80', '[::1]:80' ] }
-               .lest || { ['*:80'] }
+  $mirror_basedir_prefix = hiera('role_config__mirrors.mirror_basedir_prefix')
+  $archive_root = "${mirror_basedir_prefix}debian"
+  $listen_addresses = hiera('roles.debian_mirror')
+    .dig($::fqdn, 'listen-addresses')
+    .then |$a| { $a + [ '127.0.0.1:80', '[::1]:80' ] }
+    .lest || { ['*:80'] }
 
-       $vhost_listen = join([
-               *$listen_addresses,
-               has_role('bgp') ? {
-                       true => '193.31.7.2:80 [2a02:158:ffff:deb::2]:80',
-                       default => '',
-               }], ' ')
+  $vhost_listen = join([
+    *$listen_addresses,
+    has_role('bgp') ? {
+      true    => '193.31.7.2:80 [2a02:158:ffff:deb::2]:80',
+      default => '',
+    }], ' ')
 
-       apache2::site { '010-ftp.debian.org':
-               site   => 'ftp.debian.org',
-               content => template('roles/apache-ftp.debian.org.erb'),
-       }
+  apache2::site { '010-ftp.debian.org':
+    site    => 'ftp.debian.org',
+    content => template('roles/apache-ftp.debian.org.erb'),
+  }
 
-       $onion_v4_addr = hiera("roles.debian_mirror", {})
-               .dig($::fqdn, 'onion_v4_address')
-       if $onion_v4_addr {
-               onion::service { 'ftp.debian.org':
-                       port => 80,
-                       target_port => 80,
-                       target_address => $onion_v4_addr,
-               }
-       }
+  $onion_v4_addr = hiera('roles.debian_mirror', {})
+    .dig($::fqdn, 'onion_v4_address')
+  if $onion_v4_addr {
+    onion::service { 'ftp.debian.org':
+      port           => 80,
+      target_port    => 80,
+      target_address => $onion_v4_addr,
+    }
+  }
 
-       $hosts_to_check = hiera('roles.debian_mirror', {})
-               .filter |$h| { $h[1]['fastly-backend'] }
-               .map |$h| { $h[1]['service-hostname'] }
+  $hosts_to_check = hiera('roles.debian_mirror', {})
+    .filter |$h| { $h[1]['fastly-backend'] }
+    .map |$h| { $h[1]['service-hostname'] }
 
-       roles::mirror_health { 'ftp':
-               check_hosts   => $hosts_to_check,
-               check_service => 'ftp',
-               url           => 'http://debian.backend.mirrors.debian.org/debian/dists/sid/Release',
-               health_url    => 'http://debian.backend.mirrors.debian.org/_health',
-       }
+  roles::mirror_health { 'ftp':
+    check_hosts   => $hosts_to_check,
+    check_service => 'ftp',
+    url           => 'http://debian.backend.mirrors.debian.org/debian/dists/sid/Release',
+    health_url    => 'http://debian.backend.mirrors.debian.org/_health',
+  }
 }
index ac01ff6..6892c26 100644 (file)
@@ -1,41 +1,41 @@
 class roles::debug_mirror {
-       include roles::archvsync_base
+  include roles::archvsync_base
 
-       $mirror_basedir_prefix = hiera('role_config__mirrors.mirror_basedir_prefix')
-       $archive_root = "${mirror_basedir_prefix}debian-debug"
+  $mirror_basedir_prefix = hiera('role_config__mirrors.mirror_basedir_prefix')
+  $archive_root = "${mirror_basedir_prefix}debian-debug"
 
-       $listen_addresses = hiera('roles.debug_mirror')
-               .dig($::fqdn, 'listen-addresses')
-               .then |$a| { $a + [ '127.0.0.1:80', '[::1]:80' ] }
-               .lest || { ['*:80'] }
+  $listen_addresses = hiera('roles.debug_mirror')
+    .dig($::fqdn, 'listen-addresses')
+    .then |$a| { $a + [ '127.0.0.1:80', '[::1]:80' ] }
+    .lest || { ['*:80'] }
 
-       $vhost_listen = join($listen_addresses, ' ')
-       $onion_v4_addr = hiera("roles.debug_mirror", {})
-               .dig($::fqdn, 'onion_v4_address')
+  $vhost_listen = join($listen_addresses, ' ')
+  $onion_v4_addr = hiera('roles.debug_mirror', {})
+    .dig($::fqdn, 'onion_v4_address')
 
-       apache2::site { '010-debug.mirrors.debian.org':
-               site   => 'debug.mirrors.debian.org',
-               content => template('roles/apache-debug.mirrors.debian.org.erb'),
-       }
+  apache2::site { '010-debug.mirrors.debian.org':
+    site    => 'debug.mirrors.debian.org',
+    content => template('roles/apache-debug.mirrors.debian.org.erb'),
+  }
 
-       if has_role('debug_mirror_onion') {
-               if ! $onion_v4_addr {
-                       fail("Do not have an onion_v4_addr set for $::hostname.")
-               }
+  if has_role('debug_mirror_onion') {
+    if ! $onion_v4_addr {
+      fail("Do not have an onion_v4_addr set for ${::hostname}.")
+    }
 
-               onion::service { 'debug.mirrors.debian.org':
-                       port => 80,
-                       target_port => 80,
-                       target_address => $onion_v4_addr,
-               }
-       }
+    onion::service { 'debug.mirrors.debian.org':
+      port           => 80,
+      target_port    => 80,
+      target_address => $onion_v4_addr,
+    }
+  }
 
-       $hosts_to_check = hiera('roles.debug_mirror', {})
-               .map |$h| { $h[1]['service-hostname'] }
-       roles::mirror_health { 'debug':
-               check_hosts     => $hosts_to_check,
-               check_service   => 'debug',
-               url             => 'http://debug.backend.mirrors.debian.org/debian-debug/dists/sid-debug/Release',
-               health_url      => 'http://debug.backend.mirrors.debian.org/_health',
-       }
+  $hosts_to_check = hiera('roles.debug_mirror', {})
+    .map |$h| { $h[1]['service-hostname'] }
+  roles::mirror_health { 'debug':
+    check_hosts   => $hosts_to_check,
+    check_service => 'debug',
+    url           => 'http://debug.backend.mirrors.debian.org/debian-debug/dists/sid-debug/Release',
+    health_url    => 'http://debug.backend.mirrors.debian.org/_health',
+  }
 }
index 3ba3539..e970ce7 100644 (file)
@@ -1,53 +1,53 @@
 class roles::historical_mirror {
-       include roles::archvsync_base
-       include apache2::expires
-
-       $mirror_basedir_prefix = hiera('role_config__mirrors.mirror_basedir_prefix')
-       $archive_root = "${mirror_basedir_prefix}debian-archive"
-
-       $binds = $::hostname ? {
-               gretchaninov  => ['209.87.16.41'   , '[2607:f8f0:614:1::1274:41]'          ],
-               klecker       => ['130.89.148.13'  , '[2001:67c:2564:a119::148:13]'        ],
-               schmelzer     => ['217.196.149.234', '[2a02:16a8:dc41:100::234]'           ],
-               sibelius      => ['193.62.202.28'  , '[2001:630:206:4000:1a1a:0:c13e:ca1c]'],
-               default       => ['[::]'],
-       }
-
-       $onion_v4_addr = $::hostname ? {
-               default    => undef,
-       }
-
-       apache2::site { '010-archive.debian.org':
-               site   => 'archive.debian.org',
-               content => template('roles/apache-archive.debian.org.erb'),
-       }
-
-       if has_role('historical_master') {
-               $sslname = 'archive-master.debian.org'
-               ssl::service { $sslname:
-                       key      => true,
-                       tlsaport => [],
-               }
-       } else {
-               $sslname = undef
-       }
-
-       rsync::site { 'archive':
-               content     => template('roles/historical_mirror/rsyncd.conf.erb'),
-               max_clients => 100,
-               sslname     => $sslname,
-               binds       => $binds,
-       }
-
-       if has_role('historical_mirror_onion') {
-               if ! $onion_v4_addr {
-                       fail("Do not have an onion_v4_addr set for $::hostname.")
-               }
-
-               onion::service { 'archive.debian.org':
-                       port => 80,
-                       target_port => 80,
-                       target_address => $onion_v4_addr,
-               }
-       }
+  include roles::archvsync_base
+  include apache2::expires
+
+  $mirror_basedir_prefix = hiera('role_config__mirrors.mirror_basedir_prefix')
+  $archive_root = "${mirror_basedir_prefix}debian-archive"
+
+  $binds = $::hostname ? {
+    gretchaninov => ['209.87.16.41'   , '[2607:f8f0:614:1::1274:41]'          ],
+    klecker      => ['130.89.148.13'  , '[2001:67c:2564:a119::148:13]'        ],
+    schmelzer    => ['217.196.149.234', '[2a02:16a8:dc41:100::234]'           ],
+    sibelius     => ['193.62.202.28'  , '[2001:630:206:4000:1a1a:0:c13e:ca1c]'],
+    default      => ['[::]'],
+  }
+
+  $onion_v4_addr = $::hostname ? {
+    default => undef,
+  }
+
+  apache2::site { '010-archive.debian.org':
+    site    => 'archive.debian.org',
+    content => template('roles/apache-archive.debian.org.erb'),
+  }
+
+  if has_role('historical_master') {
+    $sslname = 'archive-master.debian.org'
+    ssl::service { $sslname:
+      key      => true,
+      tlsaport => [],
+    }
+  } else {
+    $sslname = undef
+  }
+
+  rsync::site { 'archive':
+    content     => template('roles/historical_mirror/rsyncd.conf.erb'),
+    max_clients => 100,
+    sslname     => $sslname,
+    binds       => $binds,
+  }
+
+  if has_role('historical_mirror_onion') {
+    if ! $onion_v4_addr {
+      fail("Do not have an onion_v4_addr set for ${::hostname}.")
+    }
+
+    onion::service { 'archive.debian.org':
+      port           => 80,
+      target_port    => 80,
+      target_address => $onion_v4_addr,
+    }
+  }
 }
index 4534a46..25cc301 100644 (file)
@@ -1,53 +1,53 @@
 class roles::security_mirror {
-       include roles::archvsync_base
-
-       # security abusers
-       #  198.108.67.48 DoS against our rsync service
-       ferm::rule { 'dsa-security-abusers':
-               prio  => "005",
-               rule  => "saddr ( 198.108.67.48/32 ) DROP",
-       }
-
-       $binds = $::hostname ? {
-               mirror-anu      => [ '150.203.164.61', '[2001:388:1034:2900::3d]' ],
-               mirror-isc      => [ '149.20.4.14', '[2001:4f8:1:c::14]' ],
-               mirror-umn      => [ '128.101.240.215', '[2607:ea00:101:3c0b::1deb:215]' ],
-               schmelzer       => [ '217.196.149.233', '[2a02:16a8:dc41:100::233]' ],
-               default         => [ '[::]' ],
-       }
-
-       include apache2::expires
-       include apache2::rewrite
-
-       apache2::site { '010-security.debian.org':
-               site   => 'security.debian.org',
-               content => template('roles/security_mirror/security.debian.org.erb')
-       }
-
-       $mirrors = hiera('roles.security_mirror', {})
-       $fastly_mirrors = $mirrors.filter |$h| { $h[1]['fastly-backend'] }
-       $hosts_to_check = $fastly_mirrors.map |$h| { $h[1]['service-hostname'] }
-
-       roles::mirror_health { 'security':
-               check_hosts   => $hosts_to_check,
-               check_service => 'security',
-               url           => 'http://security.backend.mirrors.debian.org/debian-security/dists/stable/updates/Release',
-               health_url    => 'http://security.backend.mirrors.debian.org/_health',
+  include roles::archvsync_base
+
+  # security abusers
+  #  198.108.67.48 DoS against our rsync service
+  ferm::rule { 'dsa-security-abusers':
+    prio => '005',
+    rule => 'saddr ( 198.108.67.48/32 ) DROP',
+  }
+
+  $binds = $::hostname ? {
+    mirror-anu => [ '150.203.164.61', '[2001:388:1034:2900::3d]' ],
+    mirror-isc => [ '149.20.4.14', '[2001:4f8:1:c::14]' ],
+    mirror-umn => [ '128.101.240.215', '[2607:ea00:101:3c0b::1deb:215]' ],
+    schmelzer  => [ '217.196.149.233', '[2a02:16a8:dc41:100::233]' ],
+    default    => [ '[::]' ],
+  }
+
+  include apache2::expires
+  include apache2::rewrite
+
+  apache2::site { '010-security.debian.org':
+    site    => 'security.debian.org',
+    content => template('roles/security_mirror/security.debian.org.erb')
+  }
+
+  $mirrors = hiera('roles.security_mirror', {})
+  $fastly_mirrors = $mirrors.filter |$h| { $h[1]['fastly-backend'] }
+  $hosts_to_check = $fastly_mirrors.map |$h| { $h[1]['service-hostname'] }
+
+  roles::mirror_health { 'security':
+    check_hosts   => $hosts_to_check,
+    check_service => 'security',
+    url           => 'http://security.backend.mirrors.debian.org/debian-security/dists/stable/updates/Release',
+    health_url    => 'http://security.backend.mirrors.debian.org/_health',
         }
 
-       rsync::site { 'security':
-               source      => 'puppet:///modules/roles/security_mirror/rsyncd.conf',
-               max_clients => 100,
-               binds       => $binds,
-       }
-
-       $onion_v4_addr = hiera("roles.security_mirror", {})
-               .dig($::fqdn, 'onion_v4_address')
-       if $onion_v4_addr {
-               onion::service { 'security.debian.org':
-                       port => 80,
-                       target_port => 80,
-                       target_address => $onion_v4_addr,
-               }
-       }
+  rsync::site { 'security':
+    source      => 'puppet:///modules/roles/security_mirror/rsyncd.conf',
+    max_clients => 100,
+    binds       => $binds,
+  }
+
+  $onion_v4_addr = hiera('roles.security_mirror', {})
+    .dig($::fqdn, 'onion_v4_address')
+  if $onion_v4_addr {
+    onion::service { 'security.debian.org':
+      port           => 80,
+      target_port    => 80,
+      target_address => $onion_v4_addr,
+    }
+  }
 }