From 3425cb37627d94ffc6e64c4a61d4524ff4c1e63b Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Sat, 1 Dec 2012 08:07:52 -0800 Subject: [PATCH] Use the mysql class to get python-mysql. Change-Id: I6d6addc2bc0e28b289726cddd6626669dbec1e17 Reviewed-on: https://review.openstack.org/17292 Reviewed-by: Jeremy Stanley Approved: James E. Blair Tested-by: Jenkins --- modules/gerrit/manifests/init.pp | 10 ++++++---- modules/jeepyb/manifests/init.pp | 7 +------ 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/modules/gerrit/manifests/init.pp b/modules/gerrit/manifests/init.pp index cff9967d90..ac8109e600 100644 --- a/modules/gerrit/manifests/init.pp +++ b/modules/gerrit/manifests/init.pp @@ -146,10 +146,12 @@ class gerrit( ensure => present, } - package { 'gerritlib': - ensure => latest, - provider => 'pip', - require => Class[pip], + if ! defined(Package['gerritlib']) { + package { 'gerritlib': + ensure => latest, + provider => 'pip', + require => Class[pip], + } } file { '/var/log/gerrit': diff --git a/modules/jeepyb/manifests/init.pp b/modules/jeepyb/manifests/init.pp index dbce38745c..ec071a0bc0 100644 --- a/modules/jeepyb/manifests/init.pp +++ b/modules/jeepyb/manifests/init.pp @@ -4,12 +4,6 @@ class jeepyb ( $git_source_repo = 'https://github.com/openstack-ci/jeepyb.git', ) { - if ! defined(Package['python-mysqldb']) { - package { 'python-mysqldb': - ensure => present, - } - } - if ! defined(Package['python-paramiko']) { package { 'python-paramiko': ensure => present, @@ -52,6 +46,7 @@ class jeepyb ( cwd => '/opt/jeepyb', path => '/bin:/usr/bin', refreshonly => true, + require => Class['mysql::python'], subscribe => Vcsrepo['/opt/jeepyb'], }