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 9c2072f525
commit a09c10ea78
2 changed files with 18 additions and 3 deletions

View File

@ -16,9 +16,14 @@ class etherpad_lite (
$base_log_dir = '/var/log', $base_log_dir = '/var/log',
$base_install_dir = '/opt/etherpad-lite', $base_install_dir = '/opt/etherpad-lite',
$nodejs_version = 'v0.6.16', $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: user { $ep_user:
shell => '/sbin/nologin', shell => '/sbin/nologin',
home => "${base_log_dir}/${ep_user}", home => "${base_log_dir}/${ep_user}",
@ -103,8 +108,7 @@ class etherpad_lite (
exec { 'install_etherpad_dependencies': exec { 'install_etherpad_dependencies':
command => './bin/installDeps.sh', command => './bin/installDeps.sh',
path => path => $path,
"/usr/bin:/bin:/usr/local/bin:${base_install_dir}/etherpad-lite",
user => $ep_user, user => $ep_user,
cwd => "${base_install_dir}/etherpad-lite", cwd => "${base_install_dir}/etherpad-lite",
environment => "HOME=${base_log_dir}/${ep_user}", environment => "HOME=${base_log_dir}/${ep_user}",
@ -116,6 +120,16 @@ class etherpad_lite (
creates => "${base_install_dir}/etherpad-lite/node_modules", 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': file { '/etc/init/etherpad-lite.conf':
ensure => present, ensure => present,
content => template('etherpad_lite/upstart.erb'), content => template('etherpad_lite/upstart.erb'),

View File

@ -16,6 +16,7 @@ class openstack_project::etherpad_dev (
# the following to test automated upgrade by puppet. # the following to test automated upgrade by puppet.
# eplite_version => '1.1.4', # eplite_version => '1.1.4',
# nodejs_version => 'v0.8.14', # nodejs_version => 'v0.8.14',
ep_headings => true
} }
include etherpad_lite::backup include etherpad_lite::backup