88feb8d40f
This patch adds logging to the puppet exec for manage-projects within gerrit.pp. It also adds logging to jeepyb, which can also cover logging for manage-projects, which is a script within jeepyb. Change-Id: I4cd1137e4bf62e0d19a8a337c98b3a33df38a0c0 Fixes-bug: 1245905
56 lines
1.2 KiB
Puppet
56 lines
1.2 KiB
Puppet
# == Class: jeepyb
|
|
#
|
|
class jeepyb (
|
|
$git_source_repo = 'https://git.openstack.org/openstack-infra/jeepyb',
|
|
) {
|
|
include mysql::python
|
|
|
|
if ! defined(Package['python-paramiko']) {
|
|
package { 'python-paramiko':
|
|
ensure => present,
|
|
}
|
|
}
|
|
|
|
package { 'gcc':
|
|
ensure => present,
|
|
}
|
|
|
|
# A lot of things need yaml, be conservative requiring this package to avoid
|
|
# conflicts with other modules.
|
|
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.")
|
|
}
|
|
}
|
|
|
|
vcsrepo { '/opt/jeepyb':
|
|
ensure => latest,
|
|
provider => git,
|
|
revision => 'master',
|
|
source => $git_source_repo,
|
|
}
|
|
|
|
exec { 'install_jeepyb' :
|
|
command => 'pip install /opt/jeepyb',
|
|
path => '/usr/local/bin:/usr/bin:/bin/',
|
|
refreshonly => true,
|
|
require => Class['mysql::python'],
|
|
subscribe => Vcsrepo['/opt/jeepyb'],
|
|
logoutput => true,
|
|
}
|
|
}
|