From 1b96a97126a312668c4d50a3909d1f668542de71 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Mon, 17 Dec 2012 13:17:59 +0000 Subject: [PATCH 1/1] Add staticsync key to static-master-authorized_keys manually --- .../static-mirroring/static-master-authorized_keys.erb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/roles/templates/static-mirroring/static-master-authorized_keys.erb b/modules/roles/templates/static-mirroring/static-master-authorized_keys.erb index 9d01eef2..6f04c69f 100644 --- a/modules/roles/templates/static-mirroring/static-master-authorized_keys.erb +++ b/modules/roles/templates/static-mirroring/static-master-authorized_keys.erb @@ -13,14 +13,18 @@ def getstaticsynckey(host) return key end +localinfo = scope.lookupvar('site::localinfo') +allnodeinfo = scope.lookupvar('site::allnodeinfo') + mirrors = [] -scope.lookupvar('site::localinfo').keys.sort.each do |node| - if scope.lookupvar('site::localinfo')[node]['static_mirror'] or scope.lookupvar('site::localinfo')[node]['static_source'] +localinfo.keys.sort.each do |node| + if localinfo[node]['static_mirror'] or localinfo[node]['static_source'] key = getstaticsynckey(node) - mirrors << { 'node' => node, 'addr' => scope.lookupvar('site::allnodeinfo')[node]['ipHostNumber'], 'key' => key} + mirrors << { 'node' => node, 'addr' => allnodeinfo[node]['ipHostNumber'], 'key' => key} end end +mirrors << { 'node' => 'wagner.debian.org', 'addr' => allnodeinfo['wagner.debian.org']['ipHostNumber'], 'key' => 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCXHFIkIhOC5iDa0d0IN5w6tUUL2T2iXCYcS2+dandE9f550OpKQ/evUZhw4EERNYDA3G7GV3jJzQR0j/KZWJUtDCichmqS94xJqXURmZVNeLXWY9x/N7CB1iG1Iblu6sgyTUrs7N6Wb0fUab3AXAi9KIXdwNLY622reR9T//bRULPVIl5VFpYtGBPT9n3wR7fLQ4ndEcUmEGcM4jRbpLmye4QGgJotuzeBWUpX+U648Yly6U7NlAJIWPUt7hEzMz2AC81SLhGCwTk6sb19n2dO6WN2ndynp8PLG1emtgd1/DaeaRyPcitoWgSoDNgKNk3zLIDtCdSYvFI8xXrm6cK3 staticsync@wagner'} lines = [] for m in mirrors: -- 2.39.2