2 ## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
6 def getstaticsynckey(host)
9 facts = YAML.load(File.open("/var/lib/puppet/yaml/facts/#{host}.yaml").read)
10 return facts.values['staticsync_key']
16 localinfo = scope.lookupvar('site::localinfo')
17 allnodeinfo = scope.lookupvar('site::allnodeinfo')
20 localinfo.keys.sort.each do |node|
21 if localinfo[node]['static_mirror'] or localinfo[node]['static_source']
22 key = getstaticsynckey(node)
23 mirrors << { 'node' => node, 'addr' => allnodeinfo[node]['ipHostNumber'], 'key' => key}
29 lines << '# ' + m['node']
31 lines << "# no key for node"
33 lines << "command=\"/usr/local/bin/static-master-ssh-wrap #{m['node']}\"," +
34 'no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-user-rc,' +
35 'from="' + m['addr'].join(',') + '" ' +
43 # vim:set shiftwidth=4: