2012-11-22 10:45:10 -08:00
|
|
|
# == Class: jeepyb
|
|
|
|
#
|
|
|
|
class jeepyb (
|
2013-07-21 21:08:11 -07:00
|
|
|
$git_source_repo = 'https://git.openstack.org/openstack-infra/jeepyb',
|
2015-04-06 12:10:18 -07:00
|
|
|
$git_revision = 'master',
|
2012-11-22 10:45:10 -08:00
|
|
|
) {
|
2015-08-03 18:34:13 -07:00
|
|
|
include ::mysql::python
|
2012-11-22 10:45:10 -08:00
|
|
|
|
2012-11-29 09:48:44 -08:00
|
|
|
if ! defined(Package['python-paramiko']) {
|
|
|
|
package { 'python-paramiko':
|
|
|
|
ensure => present,
|
|
|
|
}
|
2012-11-22 10:45:10 -08:00
|
|
|
}
|
|
|
|
|
2013-07-29 13:33:04 -07:00
|
|
|
package { 'gcc':
|
|
|
|
ensure => present,
|
|
|
|
}
|
|
|
|
|
2012-11-22 10:45:10 -08:00
|
|
|
# A lot of things need yaml, be conservative requiring this package to avoid
|
|
|
|
# conflicts with other modules.
|
2013-05-09 03:28:11 +00:00
|
|
|
case $::osfamily {
|
|
|
|
'Debian': {
|
|
|
|
if ! defined(Package['python-yaml']) {
|
|
|
|
package { 'python-yaml':
|
|
|
|
ensure => present,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
'RedHat': {
|
|
|
|
if ! defined(Package['PyYAML']) {
|
|
|
|
package { 'PyYAML':
|
|
|
|
ensure => present,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
default: {
|
|
|
|
fail("Unsupported osfamily: ${::osfamily} The 'jeepyb' module only supports osfamily Debian or RedHat.")
|
2012-11-22 10:45:10 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
vcsrepo { '/opt/jeepyb':
|
|
|
|
ensure => latest,
|
|
|
|
provider => git,
|
2015-04-06 12:10:18 -07:00
|
|
|
revision => $git_revision,
|
2012-11-22 10:45:10 -08:00
|
|
|
source => $git_source_repo,
|
|
|
|
}
|
|
|
|
|
|
|
|
exec { 'install_jeepyb' :
|
2013-10-10 14:17:16 -04:00
|
|
|
command => 'pip install /opt/jeepyb',
|
|
|
|
path => '/usr/local/bin:/usr/bin:/bin/',
|
2012-11-22 10:45:10 -08:00
|
|
|
refreshonly => true,
|
2012-12-01 08:07:52 -08:00
|
|
|
require => Class['mysql::python'],
|
2012-11-22 10:45:10 -08:00
|
|
|
subscribe => Vcsrepo['/opt/jeepyb'],
|
2014-02-09 13:23:50 -05:00
|
|
|
logoutput => true,
|
2012-11-22 10:45:10 -08:00
|
|
|
}
|
|
|
|
}
|