aboutsummaryrefslogtreecommitdiffstats
path: root/modules/viewvc
diff options
context:
space:
mode:
authorNicolas Vigier <boklm@mageia.org>2013-01-03 17:09:36 +0000
committerNicolas Vigier <boklm@mageia.org>2013-01-03 17:09:36 +0000
commit466b6c0dda406e942d17079fcd7529f8ed756fc4 (patch)
treeafe2ce69aa366b83fe9bd42b8caa9aadf605eced /modules/viewvc
parentf2a95b17b775de16d499f0876502fab8717f7c60 (diff)
downloadpuppet-466b6c0dda406e942d17079fcd7529f8ed756fc4.tar
puppet-466b6c0dda406e942d17079fcd7529f8ed756fc4.tar.gz
puppet-466b6c0dda406e942d17079fcd7529f8ed756fc4.tar.bz2
puppet-466b6c0dda406e942d17079fcd7529f8ed756fc4.tar.xz
puppet-466b6c0dda406e942d17079fcd7529f8ed756fc4.zip
viewvc: add robots.txt
Diffstat (limited to 'modules/viewvc')
-rw-r--r--modules/viewvc/files/robots.txt12
-rw-r--r--modules/viewvc/manifests/init.pp11
2 files changed, 22 insertions, 1 deletions
diff --git a/modules/viewvc/files/robots.txt b/modules/viewvc/files/robots.txt
new file mode 100644
index 00000000..96abad70
--- /dev/null
+++ b/modules/viewvc/files/robots.txt
@@ -0,0 +1,12 @@
+User-agent: Googlebot
+User-agent: Baiduspider
+User-agent: bingbot
+User-agent: YandexBot
+User-agent: AhrefsBot
+User-agent: Mail.RU_Bot
+User-agent: MJ12bot
+Disallow: /viewvc/*/tags/
+Disallow: *?view=annotate*
+Disallow: *?annotate=*
+Disallow: *?view=diff*
+Disallow: *?r1=*
diff --git a/modules/viewvc/manifests/init.pp b/modules/viewvc/manifests/init.pp
index b4a1936c..29a50f48 100644
--- a/modules/viewvc/manifests/init.pp
+++ b/modules/viewvc/manifests/init.pp
@@ -28,9 +28,18 @@ class viewvc {
environment => 'MAILTO=root',
}
+ $robotsfile = '/var/www/viewvc/robots.txt'
+ file { $robotsfile:
+ ensure => present,
+ mode => 0644,
+ owner => root,
+ group => root,
+ source => 'puppet://modules/viewvc/robots.txt',
+ }
+
apache::vhost::base { "svnweb.$::domain":
aliases => {'/viewvc' => '/var/www/viewvc/',
- '/robots.txt' => '/var/www/viewvc/robots.txt',
+ '/robots.txt' => $robotsfile,
'/' => '/usr/share/viewvc/bin/wsgi/viewvc.fcgi/'},
content => template('viewvc/vhost.conf')
}