Add optional, enabled by default, robots.txt

Change-Id: I6cc0bbb8f84420fe640e65d26e1cdc4a4d961ba4
This commit is contained in:
Elizabeth K. Joseph 2015-09-21 16:30:29 -07:00
parent 3dcfde15bb
commit d38753b5f6
2 changed files with 14 additions and 1 deletions

2
files/robots.txt Normal file
View File

@ -0,0 +1,2 @@
User-agent: *
Disallow: /

View File

@ -7,7 +7,8 @@ define lodgeit::site(
$db_host='localhost',
$db_user=$name,
$vhost_name="paste.${name}.org",
$image=undef
$image=undef,
$robotstxt=true,
) {
include ::httpd
@ -53,6 +54,16 @@ define lodgeit::site(
content => template('lodgeit/layout.html.erb'),
}
if $robotstxt {
file { "/srv/lodgeit/${name}/robots.txt":
ensure => present,
owner => 'root',
group => 'root',
mode => '0444',
source => 'puppet:///modules/lodgeit/robots.txt',
require => File["/srv/lodgeit/${name}/"],
}
}
cron { "update_backup_${name}":
ensure => absent,
user => root,