From a09c10ea78ef033039e29d540f9619ef19824299 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Mon, 8 Apr 2013 11:20:16 -0400 Subject: [PATCH] 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 Reviewed-by: Paul Belanger Approved: James E. Blair Reviewed-by: James E. Blair Tested-by: Jenkins --- modules/etherpad_lite/manifests/init.pp | 20 ++++++++++++++++--- .../manifests/etherpad_dev.pp | 1 + 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/modules/etherpad_lite/manifests/init.pp b/modules/etherpad_lite/manifests/init.pp index 7c4d32413e..4c97bf8d9a 100644 --- a/modules/etherpad_lite/manifests/init.pp +++ b/modules/etherpad_lite/manifests/init.pp @@ -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'), diff --git a/modules/openstack_project/manifests/etherpad_dev.pp b/modules/openstack_project/manifests/etherpad_dev.pp index 4c56acc0c0..521dda6fb0 100644 --- a/modules/openstack_project/manifests/etherpad_dev.pp +++ b/modules/openstack_project/manifests/etherpad_dev.pp @@ -16,6 +16,7 @@ class openstack_project::etherpad_dev ( # the following to test automated upgrade by puppet. # eplite_version => '1.1.4', # nodejs_version => 'v0.8.14', + ep_headings => true } include etherpad_lite::backup