summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2012-02-09 10:14:42 -0200
committerSilvio Rhatto <rhatto@riseup.net>2012-02-09 10:14:42 -0200
commit8a3e9fcb53d3c9e876535e0d262a469ed446f2ff (patch)
tree78ea41e3aedcc927d7341296af784e20a2d7d16d
parentf7696f43f27ad5c030dbe29499973e54b07b1b65 (diff)
downloadpuppet-apache-8a3e9fcb53d3c9e876535e0d262a469ed446f2ff.tar.gz
puppet-apache-8a3e9fcb53d3c9e876535e0d262a469ed446f2ff.tar.bz2
Adding custom icons
-rw-r--r--files/icons/README.html9
-rw-r--r--files/icons/back.pngbin0 -> 955 bytes
-rw-r--r--files/icons/binary.pngbin0 -> 1044 bytes
-rw-r--r--files/icons/blank.pngbin0 -> 244 bytes
-rw-r--r--files/icons/bomb.pngbin0 -> 1090 bytes
-rw-r--r--files/icons/broken.pngbin0 -> 656 bytes
-rw-r--r--files/icons/compressed.pngbin0 -> 695 bytes
-rw-r--r--files/icons/deb.pngbin0 -> 695 bytes
-rw-r--r--files/icons/dir.pngbin0 -> 803 bytes
-rw-r--r--files/icons/down.pngbin0 -> 874 bytes
-rw-r--r--files/icons/folder.open.pngbin0 -> 803 bytes
-rw-r--r--files/icons/folder.pngbin0 -> 803 bytes
-rw-r--r--files/icons/forward.pngbin0 -> 930 bytes
-rw-r--r--files/icons/hand.down.pngbin0 -> 874 bytes
-rw-r--r--files/icons/hand.left.pngbin0 -> 955 bytes
-rw-r--r--files/icons/hand.right.pngbin0 -> 930 bytes
-rw-r--r--files/icons/hand.up.pngbin0 -> 877 bytes
-rw-r--r--files/icons/html.pngbin0 -> 1097 bytes
-rw-r--r--files/icons/image.pngbin0 -> 900 bytes
-rw-r--r--files/icons/index.pngbin0 -> 1097 bytes
-rw-r--r--files/icons/info.pngbin0 -> 1204 bytes
-rw-r--r--files/icons/iso.info.pngbin0 -> 1734 bytes
-rw-r--r--files/icons/iso.pngbin0 -> 1570 bytes
-rw-r--r--files/icons/jar.pngbin0 -> 885 bytes
-rw-r--r--files/icons/left.pngbin0 -> 955 bytes
-rw-r--r--files/icons/movie.pngbin0 -> 1343 bytes
-rw-r--r--files/icons/odp.pngbin0 -> 914 bytes
-rw-r--r--files/icons/ods.pngbin0 -> 1011 bytes
-rw-r--r--files/icons/odt.pngbin0 -> 654 bytes
-rw-r--r--files/icons/ppt.pngbin0 -> 914 bytes
-rw-r--r--files/icons/ps.pngbin0 -> 654 bytes
-rw-r--r--files/icons/right.pngbin0 -> 930 bytes
-rw-r--r--files/icons/rpm.pngbin0 -> 695 bytes
-rw-r--r--files/icons/script.pngbin0 -> 885 bytes
-rw-r--r--files/icons/sound.pngbin0 -> 776 bytes
-rw-r--r--files/icons/text.pngbin0 -> 654 bytes
-rw-r--r--files/icons/txt.pngbin0 -> 523 bytes
-rw-r--r--files/icons/unknown.pngbin0 -> 656 bytes
-rw-r--r--files/icons/up.pngbin0 -> 877 bytes
-rw-r--r--files/icons/world.pngbin0 -> 1319 bytes
-rw-r--r--files/icons/xls.pngbin0 -> 1011 bytes
-rw-r--r--manifests/init.pp35
-rw-r--r--templates/alias.conf.erb24
-rw-r--r--templates/apache2.conf.erb77
-rw-r--r--templates/autoindex.conf.erb79
45 files changed, 147 insertions, 77 deletions
diff --git a/files/icons/README.html b/files/icons/README.html
new file mode 100644
index 0000000..bc2df96
--- /dev/null
+++ b/files/icons/README.html
@@ -0,0 +1,9 @@
+<h1>Kiddo's Tango icon theme for the Apache server</h1>
+<p>This is a port of the magnificent Tango icon theme to the Apache automatic directory indexing infrastructure. It includes an autoindex.conf file to tell Apache which icons to match to which mimetypes, and various other things to make your directory listings prettier.</p>
+<h2>To set it up</h2>
+<ol>
+ <li>download with <a href="http://bazaar-vcs.org">Bazaar</a>, using <code>bzr get http://code.ecchi.ca/apache-tango-icons</code></li>
+ <li>check that I do not have bad intentions</li>
+ <li>run <code>./install.sh</code></li>
+</ol>
+<p>Icons from the <a href="http://tango.freedesktop.org">Tango Desktop Project</a></p>
diff --git a/files/icons/back.png b/files/icons/back.png
new file mode 100644
index 0000000..93be3d1
--- /dev/null
+++ b/files/icons/back.png
Binary files differ
diff --git a/files/icons/binary.png b/files/icons/binary.png
new file mode 100644
index 0000000..2bb2adf
--- /dev/null
+++ b/files/icons/binary.png
Binary files differ
diff --git a/files/icons/blank.png b/files/icons/blank.png
new file mode 100644
index 0000000..34e6c4e
--- /dev/null
+++ b/files/icons/blank.png
Binary files differ
diff --git a/files/icons/bomb.png b/files/icons/bomb.png
new file mode 100644
index 0000000..fbcf936
--- /dev/null
+++ b/files/icons/bomb.png
Binary files differ
diff --git a/files/icons/broken.png b/files/icons/broken.png
new file mode 100644
index 0000000..e12439a
--- /dev/null
+++ b/files/icons/broken.png
Binary files differ
diff --git a/files/icons/compressed.png b/files/icons/compressed.png
new file mode 100644
index 0000000..dc76287
--- /dev/null
+++ b/files/icons/compressed.png
Binary files differ
diff --git a/files/icons/deb.png b/files/icons/deb.png
new file mode 100644
index 0000000..dc76287
--- /dev/null
+++ b/files/icons/deb.png
Binary files differ
diff --git a/files/icons/dir.png b/files/icons/dir.png
new file mode 100644
index 0000000..eaf4be8
--- /dev/null
+++ b/files/icons/dir.png
Binary files differ
diff --git a/files/icons/down.png b/files/icons/down.png
new file mode 100644
index 0000000..af23788
--- /dev/null
+++ b/files/icons/down.png
Binary files differ
diff --git a/files/icons/folder.open.png b/files/icons/folder.open.png
new file mode 100644
index 0000000..eaf4be8
--- /dev/null
+++ b/files/icons/folder.open.png
Binary files differ
diff --git a/files/icons/folder.png b/files/icons/folder.png
new file mode 100644
index 0000000..eaf4be8
--- /dev/null
+++ b/files/icons/folder.png
Binary files differ
diff --git a/files/icons/forward.png b/files/icons/forward.png
new file mode 100644
index 0000000..6f3f65d
--- /dev/null
+++ b/files/icons/forward.png
Binary files differ
diff --git a/files/icons/hand.down.png b/files/icons/hand.down.png
new file mode 100644
index 0000000..af23788
--- /dev/null
+++ b/files/icons/hand.down.png
Binary files differ
diff --git a/files/icons/hand.left.png b/files/icons/hand.left.png
new file mode 100644
index 0000000..93be3d1
--- /dev/null
+++ b/files/icons/hand.left.png
Binary files differ
diff --git a/files/icons/hand.right.png b/files/icons/hand.right.png
new file mode 100644
index 0000000..6f3f65d
--- /dev/null
+++ b/files/icons/hand.right.png
Binary files differ
diff --git a/files/icons/hand.up.png b/files/icons/hand.up.png
new file mode 100644
index 0000000..b0a0cd7
--- /dev/null
+++ b/files/icons/hand.up.png
Binary files differ
diff --git a/files/icons/html.png b/files/icons/html.png
new file mode 100644
index 0000000..51beaff
--- /dev/null
+++ b/files/icons/html.png
Binary files differ
diff --git a/files/icons/image.png b/files/icons/image.png
new file mode 100644
index 0000000..10f4671
--- /dev/null
+++ b/files/icons/image.png
Binary files differ
diff --git a/files/icons/index.png b/files/icons/index.png
new file mode 100644
index 0000000..51beaff
--- /dev/null
+++ b/files/icons/index.png
Binary files differ
diff --git a/files/icons/info.png b/files/icons/info.png
new file mode 100644
index 0000000..07cf010
--- /dev/null
+++ b/files/icons/info.png
Binary files differ
diff --git a/files/icons/iso.info.png b/files/icons/iso.info.png
new file mode 100644
index 0000000..8528ffa
--- /dev/null
+++ b/files/icons/iso.info.png
Binary files differ
diff --git a/files/icons/iso.png b/files/icons/iso.png
new file mode 100644
index 0000000..2a7b970
--- /dev/null
+++ b/files/icons/iso.png
Binary files differ
diff --git a/files/icons/jar.png b/files/icons/jar.png
new file mode 100644
index 0000000..abf8f61
--- /dev/null
+++ b/files/icons/jar.png
Binary files differ
diff --git a/files/icons/left.png b/files/icons/left.png
new file mode 100644
index 0000000..93be3d1
--- /dev/null
+++ b/files/icons/left.png
Binary files differ
diff --git a/files/icons/movie.png b/files/icons/movie.png
new file mode 100644
index 0000000..6e26d9c
--- /dev/null
+++ b/files/icons/movie.png
Binary files differ
diff --git a/files/icons/odp.png b/files/icons/odp.png
new file mode 100644
index 0000000..3633f53
--- /dev/null
+++ b/files/icons/odp.png
Binary files differ
diff --git a/files/icons/ods.png b/files/icons/ods.png
new file mode 100644
index 0000000..c82d574
--- /dev/null
+++ b/files/icons/ods.png
Binary files differ
diff --git a/files/icons/odt.png b/files/icons/odt.png
new file mode 100644
index 0000000..c9baeda
--- /dev/null
+++ b/files/icons/odt.png
Binary files differ
diff --git a/files/icons/ppt.png b/files/icons/ppt.png
new file mode 100644
index 0000000..3633f53
--- /dev/null
+++ b/files/icons/ppt.png
Binary files differ
diff --git a/files/icons/ps.png b/files/icons/ps.png
new file mode 100644
index 0000000..c9baeda
--- /dev/null
+++ b/files/icons/ps.png
Binary files differ
diff --git a/files/icons/right.png b/files/icons/right.png
new file mode 100644
index 0000000..6f3f65d
--- /dev/null
+++ b/files/icons/right.png
Binary files differ
diff --git a/files/icons/rpm.png b/files/icons/rpm.png
new file mode 100644
index 0000000..dc76287
--- /dev/null
+++ b/files/icons/rpm.png
Binary files differ
diff --git a/files/icons/script.png b/files/icons/script.png
new file mode 100644
index 0000000..abf8f61
--- /dev/null
+++ b/files/icons/script.png
Binary files differ
diff --git a/files/icons/sound.png b/files/icons/sound.png
new file mode 100644
index 0000000..7aca4aa
--- /dev/null
+++ b/files/icons/sound.png
Binary files differ
diff --git a/files/icons/text.png b/files/icons/text.png
new file mode 100644
index 0000000..c9baeda
--- /dev/null
+++ b/files/icons/text.png
Binary files differ
diff --git a/files/icons/txt.png b/files/icons/txt.png
new file mode 100644
index 0000000..d68a56c
--- /dev/null
+++ b/files/icons/txt.png
Binary files differ
diff --git a/files/icons/unknown.png b/files/icons/unknown.png
new file mode 100644
index 0000000..e12439a
--- /dev/null
+++ b/files/icons/unknown.png
Binary files differ
diff --git a/files/icons/up.png b/files/icons/up.png
new file mode 100644
index 0000000..b0a0cd7
--- /dev/null
+++ b/files/icons/up.png
Binary files differ
diff --git a/files/icons/world.png b/files/icons/world.png
new file mode 100644
index 0000000..4125479
--- /dev/null
+++ b/files/icons/world.png
Binary files differ
diff --git a/files/icons/xls.png b/files/icons/xls.png
new file mode 100644
index 0000000..c82d574
--- /dev/null
+++ b/files/icons/xls.png
Binary files differ
diff --git a/manifests/init.pp b/manifests/init.pp
index 3008b87..9ab4cda 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -117,6 +117,41 @@ class apache {
notify => Service["apache"],
}
+ # apache alias configuration
+ file { "${apache2_mods}-available/alias.conf":
+ ensure => present,
+ content => template('apache/alias.conf.erb'),
+ owner => root,
+ group => root,
+ mode => 0644,
+ notify => Service["apache"],
+ }
+
+ # apache autoindex configuration
+ file { "${apache2_mods}-available/autoindex.conf":
+ ensure => present,
+ content => template('apache/autoindex.conf.erb'),
+ owner => root,
+ group => root,
+ mode => 0644,
+ notify => Service["apache"],
+ }
+
+ # icons folder
+ file { "${apache_www_folder}/icons":
+ ensure => directory,
+ recurse => true,
+ purge => true,
+ force => true,
+ owner => "root",
+ group => "root",
+ # This mode will also apply to files from the source directory
+ mode => 0644,
+ # Puppet will automatically set +x for directories
+ source => [ "puppet:///modules/site-apache/htdocs/$domain/icons",
+ "puppet:///modules/apache/icons", ]
+ }
+
# default site configuration
file { "${apache2_sites}-available/default":
ensure => present,
diff --git a/templates/alias.conf.erb b/templates/alias.conf.erb
new file mode 100644
index 0000000..342213b
--- /dev/null
+++ b/templates/alias.conf.erb
@@ -0,0 +1,24 @@
+<IfModule alias_module>
+#
+# Aliases: Add here as many aliases as you need (with no limit). The format is
+# Alias fakename realname
+#
+# Note that if you include a trailing / on fakename then the server will
+# require it to be present in the URL. So "/icons" isn't aliased in this
+# example, only "/icons/". If the fakename is slash-terminated, then the
+# realname must also be slash terminated, and if the fakename omits the
+# trailing slash, the realname must also omit it.
+#
+# We include the /icons/ alias for FancyIndexed directory listings. If
+# you do not use FancyIndexing, you may comment this out.
+#
+Alias /icons/ "<%= $apache_www_folder %>"
+
+<Directory "<%= $apache_www_folder %>">
+ Options Indexes MultiViews
+ AllowOverride None
+ Order allow,deny
+ Allow from all
+</Directory>
+
+</IfModule>
diff --git a/templates/apache2.conf.erb b/templates/apache2.conf.erb
index ee28bdc..6bb03a5 100644
--- a/templates/apache2.conf.erb
+++ b/templates/apache2.conf.erb
@@ -225,83 +225,6 @@ ServerTokens Prod
#
ServerSignature On
-#
-# Directives controlling the display of server-generated directory listings.
-#
-<IfModule mod_autoindex.c>
-
- #
- # IndexOptions: Controls the appearance of server-generated directory
- # listings.
- #
- IndexOptions FancyIndexing VersionSort HTMLTable NameWidth=*
-
- #
- # AddIcon* directives tell the server which icon to show for different
- # files or filename extensions. These are only displayed for
- # FancyIndexed directories.
- #
- AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
-
- AddIconByType (TXT,/icons/text.gif) text/*
- AddIconByType (IMG,/icons/image2.gif) image/*
- AddIconByType (SND,/icons/sound2.gif) audio/*
- AddIconByType (VID,/icons/movie.gif) video/*
-
- AddIcon /icons/binary.gif .bin .exe
- AddIcon /icons/binhex.gif .hqx
- AddIcon /icons/tar.gif .tar
- AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
- AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
- AddIcon /icons/a.gif .ps .ai .eps
- AddIcon /icons/layout.gif .html .shtml .htm .pdf
- AddIcon /icons/text.gif .txt
- AddIcon /icons/c.gif .c
- AddIcon /icons/p.gif .pl .py
- AddIcon /icons/f.gif .for
- AddIcon /icons/dvi.gif .dvi
- AddIcon /icons/uuencoded.gif .uu
- AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
- AddIcon /icons/tex.gif .tex
- AddIcon /icons/bomb.gif core
-
- AddIcon /icons/back.gif ..
- AddIcon /icons/hand.right.gif README
- AddIcon /icons/folder.gif ^^DIRECTORY^^
- AddIcon /icons/blank.gif ^^BLANKICON^^
-
- #
- # DefaultIcon is which icon to show for files which do not have an icon
- # explicitly set.
- #
- DefaultIcon /icons/unknown.gif
-
- #
- # AddDescription allows you to place a short description after a file in
- # server-generated indexes. These are only displayed for FancyIndexed
- # directories.
- # Format: AddDescription "description" filename
- #
- #AddDescription "GZIP compressed document" .gz
- #AddDescription "tar archive" .tar
- #AddDescription "GZIP compressed tar archive" .tgz
-
- #
- # ReadmeName is the name of the README file the server will look for by
- # default, and append to directory listings.
- #
- # HeaderName is the name of a file which should be prepended to
- # directory indexes.
- ReadmeName README.html
- HeaderName HEADER.html
-
- #
- # IndexIgnore is a set of filenames which directory indexing should ignore
- # and not include in the listing. Shell-style wildcarding is permitted.
- #
- IndexIgnore .??* *~ *# RCS CVS *,v *,t
-</IfModule>
-
<IfModule mod_mime.c>
#
diff --git a/templates/autoindex.conf.erb b/templates/autoindex.conf.erb
new file mode 100644
index 0000000..9d21242
--- /dev/null
+++ b/templates/autoindex.conf.erb
@@ -0,0 +1,79 @@
+<IfModule mod_autoindex.c>
+#
+# Directives controlling the display of server-generated directory listings.
+#
+
+IndexOptions FancyIndexing VersionSort SuppressDescription XHTML HTMLTable FoldersFirst NameWidth=* Charset=UTF-8
+
+# AddIcon* directives tell the server which icon to show for different
+# files or filename extensions. These are only displayed for
+# FancyIndexed directories.
+#
+
+# Custom FileType Icons by Arne Fahrenwalde
+
+# Pictures
+AddIcon /icons/image.png .jpg .jp2 .jif .jpeg .tiff .tif .pict .pct .bmp .gif .png .psd .tga .ai .indd .fh* .fh10 .xcf .svg
+
+# Application
+AddIcon /icons/app.png .app
+
+# Movies
+AddIcon /icons/movie.png .mov .mpg .mpeg .m2v .avi .divx .xvid .swf .wmv .wma .wm* .ram .rm .ogm .ogv
+
+# Documents
+AddIcon /icons/txt.png .txt .text .log
+AddIcon /icons/html.png .htm .html .xml .php .shtml .xhtml
+AddIcon /icons/odt.png .odt .rtf .doc .ps .pdf
+AddIcon /icons/ods.png .ods .xls
+AddIcon /icons/odp.png .odp .ppt .pps
+
+# Compressed Archives
+AddIcon /icons/compressed.png .sit .sitx .zip .tar .gtar .gnutar .ustar .gz .tgz .tar-gz .hqx .bin .macbin .as .arc .arj .btoa .bz2 .tbz .tbz2 .cab .z .Z .sea .taz .tar-z .cpt .lza .lha .pf .rar .uu .uue .ync .y
+
+# Sound Files
+AddIcon /icons/sound.png .mp3 .m4a .mp4 .m4* .wav .aif .aiff .ogg .oga .spx .flac
+
+# Disk Images & PKGs
+AddIcon /icons/iso.png .dmg .iso .smi .img .toast
+AddIcon /icons/deb.png .pkg .deb
+AddIcon /icons/rpm.png .rpm
+
+# Add-On
+
+AddIcon /icons/h.png .h
+AddIcon /icons/jar.png .jar
+AddIcon /icons/log.png .log
+AddIcon /icons/script.png .scpt .command .term .sh
+
+# iWork
+AddIcon /icons/pages.png .pages
+AddIcon /icons/keynote.png .key
+
+# standard-types
+AddIcon /icons/bomb.png core
+
+AddIcon /icons/back.png ..
+AddIcon /icons/hand.right.gif README
+AddIcon /icons/folder.png ^^DIRECTORY^^
+AddIcon /icons/blank.png ^^BLANKICON^^
+
+# other Types
+AddIconByEncoding (CMP,/icons/compressed.png) x-compress x-gzip
+AddIconByType (TXT,/icons/text.png) text/*
+AddIconByType (IMG,/icons/image.png) image/*
+AddIconByType (SND,/icons/sound.png) audio/*
+AddIconByType (VID,/icons/movie.png) video/*
+
+#
+# DefaultIcon is which icon to show for files which do not have an icon
+# explicitly set.
+#
+DefaultIcon /icons/unknown.png
+
+#
+# IndexIgnore is a set of filenames which directory indexing should ignore
+# and not include in the listing. Shell-style wildcarding is permitted.
+#
+IndexIgnore .??* *~ *# RCS CVS *,v *,t
+</IfModule>