remove port number from hostname
[puppet-modules/puppetlabs-apt.git] / manifests / source.pp
index 0bb9b3be7161bd3929e12e08bcfa7d8b7fa715da..c70a8cc66e2e67eabedbcc50b5a8f72f359ba50c 100644 (file)
@@ -18,7 +18,7 @@ define apt::source(
   $key_content       = undef,
   $key_source        = undef,
   $trusted_source    = undef,
-  $notify_update     = undef,
+  $notify_update     = true,
 ) {
   validate_string($architecture, $comment, $location, $repos)
   validate_bool($allow_unsigned)
@@ -124,8 +124,8 @@ define apt::source(
     if is_hash($pin) {
       $_pin = merge($pin, { 'ensure' => $ensure, 'before' => $_before })
     } elsif (is_numeric($pin) or is_string($pin)) {
-      $url_split = split($location, '/')
-      $host      = $url_split[2]
+      $url_split = split($location, '[:\/]+')
+      $host      = $url_split[1]
       $_pin = {
         'ensure'   => $ensure,
         'priority' => $pin,