33f59792c1
Add a robots.txt file for etherpad lite. Disallow / because we are using the pretty URLs. Change-Id: Ic589923d142fe8c950534c4419582502bde98a3a Reviewed-on: https://review.openstack.org/14422 Reviewed-by: Monty Taylor <mordred@inaugust.com> Reviewed-by: Paul Belanger <paul.belanger@polybeacon.com> Approved: James E. Blair <corvus@inaugust.com> Tested-by: Jenkins
68 lines
2.1 KiB
Puppet
68 lines
2.1 KiB
Puppet
class etherpad_lite::site (
|
|
$dbType = 'mysql',
|
|
$database_user = 'eplite',
|
|
$database_name = 'etherpad-lite',
|
|
$database_password,
|
|
) {
|
|
|
|
include etherpad_lite
|
|
|
|
if $dbType == 'mysql' {
|
|
service { 'etherpad-lite':
|
|
enable => true,
|
|
ensure => running,
|
|
subscribe => File["${etherpad_lite::base_install_dir}/etherpad-lite/settings.json"],
|
|
require => Class['etherpad_lite::mysql'],
|
|
}
|
|
}
|
|
else {
|
|
service { 'etherpad-lite':
|
|
enable => true,
|
|
ensure => running,
|
|
subscribe => File["${etherpad_lite::base_install_dir}/etherpad-lite/settings.json"],
|
|
}
|
|
}
|
|
|
|
file { "${etherpad_lite::base_install_dir}/etherpad-lite/settings.json":
|
|
ensure => 'present',
|
|
content => template('etherpad_lite/etherpad-lite_settings.json.erb'),
|
|
replace => true,
|
|
owner => $etherpad_lite::ep_user,
|
|
group => $etherpad_lite::ep_user,
|
|
mode => 0600,
|
|
require => Class['etherpad_lite']
|
|
}
|
|
|
|
file { "${etherpad_lite::base_install_dir}/etherpad-lite/src/static/custom/pad.js":
|
|
ensure => 'present',
|
|
source => 'puppet:///modules/etherpad_lite/pad.js',
|
|
owner => $etherpad_lite::ep_user,
|
|
group => $etherpad_lite::ep_user,
|
|
mode => 0644,
|
|
require => Class['etherpad_lite']
|
|
}
|
|
|
|
file { "${etherpad_lite::base_install_dir}/etherpad-lite/src/static/robots.txt":
|
|
ensure => present,
|
|
source => 'puppet:///modules/etherpad_lite/robots.txt',
|
|
owner => $etherpad_lite::ep_user,
|
|
group => $etherpad_lite::ep_user,
|
|
mode => '0644',
|
|
require => Class['etherpad_lite'],
|
|
}
|
|
|
|
include logrotate
|
|
logrotate::file { 'epliteerror':
|
|
log => "${etherpad_lite::base_log_dir}/${etherpad_lite::ep_user}/error.log",
|
|
options => ['compress', 'copytruncate', 'missingok', 'rotate 7', 'daily', 'notifempty'],
|
|
require => Service['etherpad-lite']
|
|
}
|
|
|
|
logrotate::file { 'epliteaccess':
|
|
log => "${etherpad_lite::base_log_dir}/${etherpad_lite::ep_user}/access.log",
|
|
options => ['compress', 'copytruncate', 'missingok', 'rotate 7', 'daily', 'notifempty'],
|
|
require => Service['etherpad-lite']
|
|
}
|
|
|
|
}
|