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

index 0acc1b9f276fcdfc311466670715a60fcbb76093..88d105b03a38546b25ea519c72ab96517af23f1c 100644 (file)
@@ -11,7 +11,7 @@ class roles::static_mirror {
        apache2::module { 'expires': }
 
        apache2::config { "local-static-vhost.conf":
-               source  => "puppet:///modules/roles/static-mirroring/static-vhost.conf",
+               content => template('roles/static-mirroring/static-vhost.conf.erb'),
        }
 
        file { '/usr/local/bin/static-mirror-run':
diff --git a/modules/roles/templates/static-mirroring/static-vhost.conf b/modules/roles/templates/static-mirroring/static-vhost.conf
deleted file mode 100644 (file)
index ea0d2ac..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-# 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/static-vhost.conf.erb b/modules/roles/templates/static-mirroring/static-vhost.conf.erb
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: