diff options
-rw-r--r-- | modules/viewvc/files/robots.txt | 12 | ||||
-rw-r--r-- | modules/viewvc/manifests/init.pp | 11 |
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') } |