]> git.donarmstrong.com Git - dsa-puppet.git/commitdiff
Try to allow additional push hosts
authorPeter Palfrader <peter@palfrader.org>
Sun, 7 Apr 2013 18:55:32 +0000 (20:55 +0200)
committerPeter Palfrader <peter@palfrader.org>
Sun, 7 Apr 2013 18:55:32 +0000 (20:55 +0200)
modules/roles/files/static-mirroring/static-components.conf
modules/roles/files/static-mirroring/static-master-ssh-wrap

index 6ce4e3aa875383f5da29ca51577f10264420d0cf..f028ff2d0000bcc1b38119efdf366e9202bec2a9 100644 (file)
@@ -1,7 +1,8 @@
 # puppetd maintained
+# <service> <source host> <directory> <extra push hosts, comma separated>
 
 mozilla.debian.net     wagner.debian.org       /srv/home/groups/pkg-mozilla/htdocs
 planet.debian.org      senfl.debian.org        /srv/planet.debian.org/www
 www.debian.org         wolkenstein.debian.org  /srv/www.debian.org/www
 bits.debian.org                master.debian.org       /srv/bits-master.debian.org/htdocs
-backports.debian.org   ries.debian.org         /srv/backports.debian.org/htdocs
+backports.debian.org   ries.debian.org         /srv/backports.debian.org/htdocs                franck.debian.org
index 9c543bf0f1ec12cc9e6ac3bf7fc517462d4da290..625d3d9b5df10229db79bf5637f68714f5784b8d 100755 (executable)
@@ -97,7 +97,23 @@ do_update_component() {
        component="$1"
        shift
 
-       hit="$(awk -v component="$component" -v host="$remote_host" '$1 == component && $2 == host {print $3; exit}' "$COMPONENTLIST")"
+       hit="$(
+               awk -v component="$component" -v host="$remote_host" '
+                 $1 == component {
+                         if ($2 == host) {
+                                 print $3
+                                 exit
+                         }
+                         split($4,extra,",")
+                         for (i in extra) {
+                                 if (host == extra[i]) {
+                                         printf "%s:%s\n", $2, $3
+                                         exit
+                                 }
+                         }
+                         exit
+                 }' "$COMPONENTLIST"
+               )"
        if [ -n "$hit" ]; then
                exec static-master-update-component "$component"
                echo >&2 "Exec failed"