X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Froles%2Ftemplates%2Fstatic-mirroring%2Fstaticsync-authorized_keys.erb;h=eecf4c65fae34c00fe0539666f705947d9ab9250;hb=38224986c26ac29b5f1b26d1ccb253a82244152d;hp=03e91b0630b5429a50eac116486cc77111d6cfe4;hpb=c3bfc09c6cb084ff66be0a986bf3cf0ca6ccadbf;p=mirror%2Fdsa-puppet.git diff --git a/modules/roles/templates/static-mirroring/staticsync-authorized_keys.erb b/modules/roles/templates/static-mirroring/staticsync-authorized_keys.erb index 03e91b063..eecf4c65f 100644 --- a/modules/roles/templates/static-mirroring/staticsync-authorized_keys.erb +++ b/modules/roles/templates/static-mirroring/staticsync-authorized_keys.erb @@ -13,12 +13,13 @@ def getstaticsynckey(host) return key end -localinfo = scope.lookupvar('site::localinfo') allnodeinfo = scope.lookupvar('site::allnodeinfo') +roles = scope.lookupvar('site::roles') callers = [] -localinfo.keys.sort.each do |node| - if localinfo[node]['static_mirror'] or localinfo[node]['static_source'] or localinfo[node]['static_master'] + +%w{static_mirror static_source static_master}.each do |role| + roles[role].each do |node| key = getstaticsynckey(node) callers << { 'node' => node, 'addr' => allnodeinfo[node]['ipHostNumber'], 'key' => key} end