]> git.donarmstrong.com Git - dsa-puppet.git/commitdiff
this should be under a role name
authorStephen Gran <steve@lobefin.net>
Sat, 28 Apr 2012 15:08:17 +0000 (16:08 +0100)
committerStephen Gran <steve@lobefin.net>
Sat, 28 Apr 2012 15:08:17 +0000 (16:08 +0100)
Signed-off-by: Stephen Gran <steve@lobefin.net>
modules/roles/templates/dakmaster/conf-builddlist.erb [new file with mode: 0644]

diff --git a/modules/roles/templates/dakmaster/conf-builddlist.erb b/modules/roles/templates/dakmaster/conf-builddlist.erb
new file mode 100644 (file)
index 0000000..d216cdc
--- /dev/null
@@ -0,0 +1,26 @@
+##
+## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
+## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
+##
+
+<Macro DebianBuilddHostList>
+
+<%=
+  lines = []
+
+  scope.lookupvar('site::allnodeinfo').keys.sort.each do |node|
+    next unless scope.lookupvar('site::allnodeinfo')[node]['purpose']
+    if scope.lookupvar('site::allnodeinfo')[node]['purpose'].include?('buildd')
+      lines << "  # #{scope.lookupvar('site::allnodeinfo')[node]['hostname'].to_s}"
+      scope.lookupvar('site::allnodeinfo')[node]['ipHostNumber'].each do |addr|
+        lines << "  allow from #{addr}"
+      end
+    end
+  end
+
+  lines.join("\n")
+# vim:set et:
+# vim:set sts=2 ts=2:
+# vim:set shiftwidth=2:
+%>
+</Macro>