]> git.donarmstrong.com Git - dsa-puppet.git/commitdiff
static vhost
authorPeter Palfrader <peter@palfrader.org>
Mon, 17 Dec 2012 13:27:20 +0000 (14:27 +0100)
committerPeter Palfrader <peter@palfrader.org>
Mon, 17 Dec 2012 13:27:20 +0000 (14:27 +0100)
modules/roles/manifests/static_mirror.pp
modules/roles/templates/static-mirroring/static-vhost.conf [new file with mode: 0644]
modules/roles/templates/static-mirroring/vhost/static-vhosts-simple.erb [new file with mode: 0644]

index 1aa20d773c45254d464822ecfc3857161f8f03f3..0acc1b9f276fcdfc311466670715a60fcbb76093 100644 (file)
@@ -10,6 +10,10 @@ class roles::static_mirror {
        apache2::module { 'rewrite': }
        apache2::module { 'expires': }
 
+       apache2::config { "local-static-vhost.conf":
+               source  => "puppet:///modules/roles/static-mirroring/static-vhost.conf",
+       }
+
        file { '/usr/local/bin/static-mirror-run':
                source => 'puppet:///modules/roles/static-mirroring/static-mirror-run',
                mode   => '0555',
@@ -35,4 +39,9 @@ class roles::static_mirror {
                site    => 'planet.debian.org',
                content => template('roles/static-mirroring/vhost/planet.debian.org.erb'),
        }
+
+       apache2::site { '10-static-vhosts-simple':
+               site => "static-vhosts-simple",
+               content => template('roles/static-mirroring/vhost/static-vhosts-simple.erb'),
+       }
 }
diff --git a/modules/roles/templates/static-mirroring/static-vhost.conf b/modules/roles/templates/static-mirroring/static-vhost.conf
new file mode 100644 (file)
index 0000000..ea0d2ac
--- /dev/null
@@ -0,0 +1,35 @@
+# puppet maintained
+
+<Macro common-static-vhost $name>
+<Macro common-$name>
+       <IfModule mod_userdir.c>
+               UserDir disabled
+       </IfModule>
+       ServerSignature On
+
+       DocumentRoot /srv/static.debian.org/cur/$name/
+       <Directory /srv/static.debian.org/cur/$name/>
+               AllowOverride FileInfo
+               Options Multiviews Indexes FollowSymLinks
+               IndexOptions FancyIndexing NameWidth=*
+               Order allow,deny
+               Allow from all
+       </Directory>
+
+       AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css
+</Macro>
+
+<Virtualhost <%= vhost_listen %> >
+       ServerName $name
+       ServerAdmin debian-admin@lists.debian.org
+
+
+       ErrorLog /var/log/apache2/$name-error.log
+       CustomLog /var/log/apache2/$name-access.log combined
+
+       Use common-$name
+</VirtualHost>
+
+</Macro>
+
+# vim:ft=apache:
diff --git a/modules/roles/templates/static-mirroring/vhost/static-vhosts-simple.erb b/modules/roles/templates/static-mirroring/vhost/static-vhosts-simple.erb
new file mode 100644 (file)
index 0000000..4cef975
--- /dev/null
@@ -0,0 +1,5 @@
+# puppet maintained
+
+Use common-static-vhost mozilla.debian.net
+
+# vim:ft=apache: