class roles::static_master inherits roles::static_base {
file {
'/etc/ssh/userkeys/staticsync':
- content => template('roles/static-master-authorized_keys.erb'),
+ content => template('roles/static-mirroring/static-master-authorized_keys.erb'),
;
'/usr/local/bin/static-master-run':
source => "puppet:///modules/roles/static-mirroring/static-master-run",
;
'/etc/static-clients.conf':
- content => template('roles/static-clients.conf.erb'),
+ content => template('roles/static-mirroring/static-clients.conf.erb'),
;
}
}
class roles::static_source inherits roles::static_base {
file {
'/etc/ssh/userkeys/staticsync':
- content => template('roles/static-mirror-authorized_keys.erb'),
+ content => template('roles/static-mirroring/static-mirror-authorized_keys.erb'),
;
'/usr/local/bin/static-mirror-ssh-wrap':
source => "puppet:///modules/roles/static-mirroring/static-mirror-ssh-wrap",
+++ /dev/null
-##
-## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
-##
-
-<%=
-
-mirrors = []
-scope.lookupvar('site::localinfo').keys.sort.each do |node|
- if scope.lookupvar('site::localinfo')[node]['static_mirror']
- mirrors << node
- end
-end
-
-
-mirrors.join("\n")
-# vim:set et:
-# vim:set sts=4 ts=4:
-# vim:set shiftwidth=4:
-%>
+++ /dev/null
-##
-## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
-##
-
-<%=
-def getstaticsynckey(host)
- key = nil
- begin
- facts = YAML.load(File.open("/var/lib/puppet/yaml/facts/#{host}.yaml").read)
- return facts.values['staticsync_key']
- rescue Exception => e
- end
- return key
-end
-
-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']
- key = getstaticsynckey(node)
- mirrors << { 'node' => node, 'addr' => scope.lookupvar('site::allnodeinfo')[node]['ipHostNumber'], 'key' => key}
- end
-end
-
-
-lines = []
-for m in mirrors:
- lines << '# ' + m['node']
- if m['key'].nil?
- lines << "# no key for node"
- else
- lines << "command=\"/usr/local/bin/static-master-ssh-wrap #{m['node']}\"," +
- 'no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-user-rc,' +
- 'from="' + m['addr'].join(',') + '" ' +
- m['key']
- end
-end
-
-lines.join("\n")
-# vim:set et:
-# vim:set sts=4 ts=4:
-# vim:set shiftwidth=4:
-%>
+++ /dev/null
-##
-## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
-##
-
-<%=
-def getstaticsynckey(host)
- key = nil
- begin
- facts = YAML.load(File.open("/var/lib/puppet/yaml/facts/#{host}.yaml").read)
- return facts.values['staticsync_key']
- rescue Exception => e
- end
- return key
-end
-
-masters = []
-scope.lookupvar('site::localinfo').keys.sort.each do |node|
- if scope.lookupvar('site::localinfo')[node]['static_master']
- key = getstaticsynckey(node)
- masters << { 'node' => node, 'addr' => scope.lookupvar('site::allnodeinfo')[node]['ipHostNumber'], 'key' => key}
- end
-end
-
-
-lines = []
-for m in masters:
- lines << '# ' + m['node']
- if m['key'].nil?
- lines << "# no key for node"
- else
- lines << "command=\"/usr/local/bin/static-mirror-ssh-wrap /srv/static.debian.org #{m['node']}\"," +
- 'no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-user-rc,' +
- 'from="' + m['addr'].join(',') + '" ' +
- m['key']
- end
-end
-
-lines.join("\n")
-# vim:set et:
-# vim:set sts=4 ts=4:
-# vim:set shiftwidth=4:
-%>
--- /dev/null
+##
+## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
+##
+
+<%=
+
+mirrors = []
+scope.lookupvar('site::localinfo').keys.sort.each do |node|
+ if scope.lookupvar('site::localinfo')[node]['static_mirror']
+ mirrors << node
+ end
+end
+
+
+mirrors.join("\n")
+# vim:set et:
+# vim:set sts=4 ts=4:
+# vim:set shiftwidth=4:
+%>
--- /dev/null
+##
+## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
+##
+
+<%=
+def getstaticsynckey(host)
+ key = nil
+ begin
+ facts = YAML.load(File.open("/var/lib/puppet/yaml/facts/#{host}.yaml").read)
+ return facts.values['staticsync_key']
+ rescue Exception => e
+ end
+ return key
+end
+
+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']
+ key = getstaticsynckey(node)
+ mirrors << { 'node' => node, 'addr' => scope.lookupvar('site::allnodeinfo')[node]['ipHostNumber'], 'key' => key}
+ end
+end
+
+
+lines = []
+for m in mirrors:
+ lines << '# ' + m['node']
+ if m['key'].nil?
+ lines << "# no key for node"
+ else
+ lines << "command=\"/usr/local/bin/static-master-ssh-wrap #{m['node']}\"," +
+ 'no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-user-rc,' +
+ 'from="' + m['addr'].join(',') + '" ' +
+ m['key']
+ end
+end
+
+lines.join("\n")
+# vim:set et:
+# vim:set sts=4 ts=4:
+# vim:set shiftwidth=4:
+%>
--- /dev/null
+##
+## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
+##
+
+<%=
+def getstaticsynckey(host)
+ key = nil
+ begin
+ facts = YAML.load(File.open("/var/lib/puppet/yaml/facts/#{host}.yaml").read)
+ return facts.values['staticsync_key']
+ rescue Exception => e
+ end
+ return key
+end
+
+masters = []
+scope.lookupvar('site::localinfo').keys.sort.each do |node|
+ if scope.lookupvar('site::localinfo')[node]['static_master']
+ key = getstaticsynckey(node)
+ masters << { 'node' => node, 'addr' => scope.lookupvar('site::allnodeinfo')[node]['ipHostNumber'], 'key' => key}
+ end
+end
+
+
+lines = []
+for m in masters:
+ lines << '# ' + m['node']
+ if m['key'].nil?
+ lines << "# no key for node"
+ else
+ lines << "command=\"/usr/local/bin/static-mirror-ssh-wrap /srv/static.debian.org #{m['node']}\"," +
+ 'no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-user-rc,' +
+ 'from="' + m['addr'].join(',') + '" ' +
+ m['key']
+ end
+end
+
+lines.join("\n")
+# vim:set et:
+# vim:set sts=4 ts=4:
+# vim:set shiftwidth=4:
+%>