add cdimage-search role
authorPeter Palfrader <peter@palfrader.org>
Tue, 31 Jan 2017 20:32:38 +0000 (21:32 +0100)
committerPeter Palfrader <peter@palfrader.org>
Tue, 31 Jan 2017 20:32:38 +0000 (21:32 +0100)
hieradata/common.yaml
modules/roles/manifests/cdimage_search.pp [new file with mode: 0644]
modules/roles/manifests/init.pp
modules/roles/templates/apache-cdimage-search.debian.org.conf.erb [new file with mode: 0644]

index 4eaf987..241cb23 100644 (file)
@@ -269,3 +269,5 @@ roles:
     - wieck.debian.org
   bgp:
     - bilbao.debian.org
+  cdimage-search:
+    - cgi-grnet-01.debian.org
diff --git a/modules/roles/manifests/cdimage_search.pp b/modules/roles/manifests/cdimage_search.pp
new file mode 100644 (file)
index 0000000..211d509
--- /dev/null
@@ -0,0 +1,8 @@
+class roles::cdimage_search {
+       package { 'debian.org-cdimage-search.debian.org': ensure => installed, }
+
+       apache2::site { '010-cdimage-search.debian.org':
+               site   => 'cdimage-search.debian.org',
+               content => template('roles/apache-cdimage-search.debian.org.conf.erb')
+       }
+}
index 978be81..15b79f0 100644 (file)
@@ -319,4 +319,7 @@ class roles {
        if has_role('bgp') {
                include roles::bgp
        }
+       if has_role('cdimage-search') {
+               include roles::cdimage_search
+       }
 }
diff --git a/modules/roles/templates/apache-cdimage-search.debian.org.conf.erb b/modules/roles/templates/apache-cdimage-search.debian.org.conf.erb
new file mode 100644 (file)
index 0000000..f6ce991
--- /dev/null
@@ -0,0 +1,24 @@
+<VirtualHost *:80>
+       ServerAdmin debian-cd@lists.debian.org
+       DocumentRoot /srv/cdimage-search.debian.org/htdocs
+       ServerName cdimage-search.debian.org
+       ErrorLog /var/log/apache2/cdimage-search.debian.org-error.log
+       CustomLog /var/log/apache2/cdimage-search.debian.org-access.log combined
+
+       ScriptAlias /cgi-bin/ /srv/cdimage-search.debian.org/cgi-bin/
+       <Directory "/srv/cdimage-search.debian.org/cgi-bin">
+               AllowOverride None
+               Options +ExecCGI -MultiViews +SymlinksIfOwnerMatch
+               Require all granted
+       </Directory>
+
+       <Directory /srv/cdimage-search.debian.org/htdocs>
+               Require all granted
+               AllowOverride none
+       </Directory>
+
+       RewriteEngine On
+       RewriteRule ^/$ /cgi-bin/find_file.cgi [PT]
+</VirtualHost>
+
+# vim:set syn=apache: