Clark Boylan 04dad8bf96 Update eplite module for new version of eplite.
Etherpad lite has changed their source tree slightly. This has
required a few updates to the etherpad lite puppet module. The
custom pad.js needs to go in a different directory and the upstart
conf file needs a couple updated paths.

In addition to the fixes a couple things have been cleaned up. Now
define an etherpadlite.openstack.org node in site.pp and copy SSL
certs from /root/secret-files.

Change-Id: I312b419aa98212b6db68232c672bc4d75f23777f
2012-05-31 23:16:57 +00:00

56 lines
1.2 KiB
Puppet

class etherpad_lite::nginx (
$default_server = 'default_server',
$server_name = 'localhost'
) {
package { 'nginx':
ensure => present
}
file { '/etc/nginx/sites-enabled/default':
ensure => absent,
require => Package['nginx'],
notify => Service['nginx']
}
file { '/etc/nginx/sites-enabled/etherpad-lite':
ensure => present,
content => template('etherpad_lite/nginx.erb'),
replace => 'true',
owner => 'root',
require => File['/etc/nginx/ssl/eplite.crt', '/etc/nginx/ssl/eplite.key'],
notify => Service['nginx']
}
file { '/etc/nginx/ssl':
ensure => directory,
owner => 'root',
mode => 0700,
}
file { '/etc/nginx/ssl/eplite.crt':
ensure => present,
replace => true,
owner => 'root',
mode => 0600,
source => 'file:///root/secret-files/eplite.crt',
require => Package['nginx'],
}
file { '/etc/nginx/ssl/eplite.key':
ensure => present,
replace => true,
owner => 'root',
mode => 0600,
source => 'file:///root/secret-files/eplite.key',
require => Package['nginx'],
}
service { 'nginx':
enable => true,
ensure => running,
hasrestart => true
}
}