7390450969
Also, seperate out the buildsource defined resource from init.pp Change-Id: I9fe46ad31943f667ebe8bb6b01a2007e0b3cf022 Reviewed-on: https://review.openstack.org/15061 Reviewed-by: Jeremy Stanley <fungi@yuggoth.org> Reviewed-by: Paul Belanger <paul.belanger@polybeacon.com> Approved: Monty Taylor <mordred@inaugust.com> Reviewed-by: Monty Taylor <mordred@inaugust.com> Tested-by: Jenkins
85 lines
2.1 KiB
Puppet
85 lines
2.1 KiB
Puppet
# == Class: etherpad_lite::site
|
|
#
|
|
class etherpad_lite::site (
|
|
$database_password,
|
|
$dbType = 'mysql',
|
|
$database_user = 'eplite',
|
|
$database_name = 'etherpad-lite'
|
|
) {
|
|
|
|
include etherpad_lite
|
|
|
|
$base = $etherpad_lite::base_install_dir
|
|
|
|
if $dbType == 'mysql' {
|
|
service { 'etherpad-lite':
|
|
ensure => running,
|
|
enable => true,
|
|
subscribe => File["${base}/etherpad-lite/settings.json"],
|
|
require => Class['etherpad_lite::mysql'],
|
|
}
|
|
}
|
|
else {
|
|
service { 'etherpad-lite':
|
|
ensure => running,
|
|
enable => true,
|
|
subscribe => File["${base}/etherpad-lite/settings.json"],
|
|
}
|
|
}
|
|
|
|
file { "${base}/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 { "${base}/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 { "${base}/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 => "${base}/${etherpad_lite::ep_user}/error.log",
|
|
options => [
|
|
'compress',
|
|
'copytruncate',
|
|
'missingok',
|
|
'rotate 7',
|
|
'daily',
|
|
'notifempty',
|
|
],
|
|
require => Service['etherpad-lite'],
|
|
}
|
|
|
|
logrotate::file { 'epliteaccess':
|
|
log => "${base}/${etherpad_lite::ep_user}/access.log",
|
|
options => [
|
|
'compress',
|
|
'copytruncate',
|
|
'missingok',
|
|
'rotate 7',
|
|
'daily',
|
|
'notifempty',
|
|
],
|
|
require => Service['etherpad-lite'],
|
|
}
|
|
}
|