system-config/modules/lodgeit/manifests/init.pp
James E. Blair a590e41d90 Fix lodgeit puppet bugs.
Add a service dependency and subscribe lodgeit to drizzle refresh
events.

Change-Id: I4ed1d5255e8e46854133f00262904291ff5f1c41
Reviewed-on: https://review.openstack.org/34893
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: Elizabeth Krumbach Joseph <lyz@princessleia.com>
Approved: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins
2013-07-01 19:33:40 +00:00

63 lines
1.2 KiB
Puppet

# == Class: lodgeit
#
class lodgeit {
$packages = [ 'python-imaging',
'python-jinja2',
'python-pybabel',
'python-werkzeug',
'python-simplejson',
'python-pygments',
'drizzle']
include apache
include pip
a2mod { 'proxy':
ensure => present,
}
a2mod { 'proxy_http':
ensure => present,
}
package { $packages:
ensure => present,
}
if ! defined(Package['python-mysqldb']) {
package { 'python-mysqldb':
ensure => present,
}
}
package { 'SQLAlchemy':
ensure => present,
provider => pip,
require => Class[pip],
}
file { '/srv/lodgeit':
ensure => directory,
}
service { 'drizzle':
ensure => running,
hasrestart => true,
require => Package['drizzle'],
}
vcsrepo { '/tmp/lodgeit-main':
ensure => latest,
provider => git,
source => 'https://github.com/openstack-infra/lodgeit.git',
}
# create initial git DB backup location
exec { 'create_db_backup':
command => 'git init /var/backups/lodgeit_db',
path => '/bin:/usr/bin',
onlyif => 'test ! -d /var/backups/lodgeit_db',
}
}