Add localhost listens when listen-addresses is set
authorTollef Fog Heen <tfheen@err.no>
Fri, 2 Feb 2018 08:33:44 +0000 (09:33 +0100)
committerTollef Fog Heen <tfheen@err.no>
Fri, 2 Feb 2018 08:33:58 +0000 (09:33 +0100)
modules/roles/manifests/debian_mirror.pp

index 78aa89b..c0b17b3 100644 (file)
@@ -6,6 +6,7 @@ class roles::debian_mirror {
         $listen_addresses = Hash(hiera('roles.debian_mirror').map |$h| {
                 $h.map |$k, $v| { [$k,$v] }[0]
         }).dig($::fqdn, 'listen-addresses')
+                .then |$a| { $a + [ '127.0.0.1:80', '[::1]:80' ] }
                 .lest || { ['*:80'] }
 
         $vhost_listen = join([