From: lrrb Date: Wed, 16 Nov 2016 22:06:37 +0000 (+0100) Subject: remove port number from hostname X-Git-Tag: 2.4.0~13^2 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=cea73db7792c92fef0915ddcb7e5b72ee360525c;hp=2298cb2b473a1d554abd343ad18943d1a879d500;p=puppet-modules%2Fpuppetlabs-apt.git remove port number from hostname Solve the issue reported in https://tickets.puppetlabs.com/browse/MODULES-4104 : remove the port number from repository location in order to get the host name of the repository. --- diff --git a/manifests/source.pp b/manifests/source.pp index 9adf6a2..c70a8cc 100644 --- a/manifests/source.pp +++ b/manifests/source.pp @@ -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,