]> git.donarmstrong.com Git - dsa-puppet.git/commitdiff
Break apache on ftpmaster hosts
authorPeter Palfrader <peter@palfrader.org>
Mon, 21 Feb 2011 23:48:45 +0000 (00:48 +0100)
committerPeter Palfrader <peter@palfrader.org>
Mon, 21 Feb 2011 23:48:45 +0000 (00:48 +0100)
modules/apache2/manifests/init.pp
modules/apache2/templates/conf-builddlist.erb [new file with mode: 0644]

index 62866e694df94a8a9c0466492581a4887248ffa9..1775bb2946d72aab0fda5a546d6997f45cdc8244 100644 (file)
@@ -136,6 +136,22 @@ class apache2 {
             command => "/etc/init.d/apache2 force-reload",
             refreshonly => true;
     }
+    case $hostname {
+        chopin,franck,morricone: {
+            package {
+                "libapache2-mod-macro": ensure => installed;
+            }
+            enable_module {
+                "macro":;
+            }
+            file {
+                "/etc/apache2/conf.d/puppet-builddlist":
+                    content => template("apache2/conf-builddlist.erb"),
+                    require => Package["apache2"],
+                    notify  => Exec["reload-apache2"];
+            }
+        }
+    }
 
     case $hostname {
         busoni,duarte,holter,lindberg,master,merkel,powell,rore: {
diff --git a/modules/apache2/templates/conf-builddlist.erb b/modules/apache2/templates/conf-builddlist.erb
new file mode 100644 (file)
index 0000000..6f80ec0
--- /dev/null
@@ -0,0 +1,27 @@
+##
+## 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 CommonBuilddHostList>
+
+<%=
+  lines = []
+
+  keyinfo.keys.sort.each do |node|
+    if keyinfo[node]['purpose'].include?('buildd')
+      lines << "  # #{keyinfo[node]['hostname'].to_s} #{nodeinfo['ldap']['architecture'][0]}"
+      keyinfo[node]['ipHostNumber'].each do |addr|
+        lines << "  allow from #{addr}"
+       end
+     end
+     out
+   end
+
+  lines.join("\n")
+# vim:set et:
+# vim:set sts=2 ts=2:
+# vim:set shiftwidth=2:
+%>
+
+</Macro>