ticharich at ubc
[mirror/dsa-puppet.git] / modules / roles / manifests / debug_mirror.pp
index 0b361d8..8f1407d 100644 (file)
@@ -2,9 +2,11 @@
 #
 # @param listen_addr IP addresses to have apache listen on
 # @param onion_service provide the onion service from this host
+# @param healthcheck_name name to access this node in the health checker
 class roles::debug_mirror(
   Array[Stdlib::IP::Address] $listen_addr = [],
   Boolean $onion_service = false,
+  Optional[String] $healthcheck_name = undef,
 ) {
   include roles::archvsync_base
   include apache2
@@ -41,12 +43,9 @@ class roles::debug_mirror(
 
   Ferm::Rule::Simple <<| tag == 'ssh::server::from::ftp_master' |>>
 
-  $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',
+  mirror_health::service { 'debug':
+    this_host_service_name => $healthcheck_name,
+    url                    => 'http://debug.backend.mirrors.debian.org/debian-debug/dists/sid-debug/Release',
+    health_url             => 'http://debug.backend.mirrors.debian.org/_health',
   }
 }