From 466b6c0dda406e942d17079fcd7529f8ed756fc4 Mon Sep 17 00:00:00 2001 From: Nicolas Vigier Date: Thu, 3 Jan 2013 17:09:36 +0000 Subject: viewvc: add robots.txt --- modules/viewvc/files/robots.txt | 12 ++++++++++++ modules/viewvc/manifests/init.pp | 11 ++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 modules/viewvc/files/robots.txt (limited to 'modules') 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') } -- cgit v1.2.1