add ep_headings option to etherpad install

Make it possible to optionally install ep_headings on an etherpad
environment. This makes it easy to enable this on some environments,
but not all. Default to 'false', but set 'true' for etherpad_dev.

With summit coming up, it would be nice to have ep_headings in the
etherpads, makes them a lot easier to read.

fix puppet lint issue with all the equals signs not lining up.

Change-Id: I8cfa12480aed0b351012161c2cdbc406c0f52e7a
Reviewed-on: https://review.openstack.org/26380
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Reviewed-by: Paul Belanger <paul.belanger@polybeacon.com>
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
This commit is contained in:
Sean Dague 2013-04-08 11:20:16 -04:00 committed by Jenkins
parent 06cad61e13
commit 6d69f50d5c
1 changed files with 17 additions and 3 deletions

View File

@ -16,9 +16,14 @@ class etherpad_lite (
$base_log_dir = '/var/log',
$base_install_dir = '/opt/etherpad-lite',
$nodejs_version = 'v0.6.16',
$eplite_version = ''
$eplite_version = '',
$ep_headings = false
) {
# where the modules are, needed to easily install modules later
$modules_dir = "${base_install_dir}/etherpad-lite/node_modules"
$path = "/usr/bin:/bin:/usr/local/bin:${base_install_dir}/etherpad-lite"
user { $ep_user:
shell => '/sbin/nologin',
home => "${base_log_dir}/${ep_user}",
@ -103,8 +108,7 @@ class etherpad_lite (
exec { 'install_etherpad_dependencies':
command => './bin/installDeps.sh',
path =>
"/usr/bin:/bin:/usr/local/bin:${base_install_dir}/etherpad-lite",
path => $path,
user => $ep_user,
cwd => "${base_install_dir}/etherpad-lite",
environment => "HOME=${base_log_dir}/${ep_user}",
@ -116,6 +120,16 @@ class etherpad_lite (
creates => "${base_install_dir}/etherpad-lite/node_modules",
}
if $ep_headings == true {
# install the headings plugin
exec {'npm install ep_headings':
cwd => $modules_dir,
path => $path,
creates => "${modules_dir}/ep_headings",
require => Exec['install_etherpad_dependencies']
}
}
file { '/etc/init/etherpad-lite.conf':
ensure => present,
content => template('etherpad_lite/upstart.erb'),