
Set custom pad.js file to mode 0644. Add nginx config for Etherpad-Lite to sites-available then symlink to that from sites-enabled. Use Ubuntu packages for Node.js and NPM instead of building from source (Precise appears to have fairly recent packages that work). Change-Id: I752a10ea32b462ef0cc8a5a515dd44c9390a4776
56 lines
1.7 KiB
Puppet
56 lines
1.7 KiB
Puppet
class etherpad_lite::site (
|
|
$dbType = 'mysql'
|
|
) {
|
|
|
|
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',
|
|
source => 'file:///root/secret-files/etherpad-lite_settings.json',
|
|
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']
|
|
}
|
|
|
|
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']
|
|
}
|
|
|
|
}
|