projects
/
mirror
/
dsa-puppet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
335d800
)
Simplify lookups now that security_mirror is a hash
author
Tollef Fog Heen
<tfheen@err.no>
Fri, 2 Feb 2018 09:24:41 +0000
(10:24 +0100)
committer
Tollef Fog Heen
<tfheen@err.no>
Fri, 2 Feb 2018 09:24:41 +0000
(10:24 +0100)
modules/roles/manifests/security_mirror.pp
patch
|
blob
|
history
diff --git
a/modules/roles/manifests/security_mirror.pp
b/modules/roles/manifests/security_mirror.pp
index
472a145
..
c7afdeb
100644
(file)
--- a/
modules/roles/manifests/security_mirror.pp
+++ b/
modules/roles/manifests/security_mirror.pp
@@
-36,11
+36,8
@@
class roles::security_mirror {
content => template('roles/security_mirror/security.debian.org.erb')
}
content => template('roles/security_mirror/security.debian.org.erb')
}
- # roles is a list of hashes, which needs to be unpacked into a regular hash
- $mirrors = hiera('roles.security_mirror', [])
- # unpack $mirrors and construct a hash
- $m2 = Hash($mirrors.map |$h| { $h.map |$k, $v| { [$k, $v] }[0]})
- $fastly_mirrors = $m2.filter |$h| { $h[1]['fastly-backend'] }
+ $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':
$hosts_to_check = $fastly_mirrors.map |$h| { $h[1]['service-hostname'] }
roles::mirror_health { 'security':