From 5c5033cbc7eb7a6ce8a4d8d8c60ebc316661a7d4 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Thu, 29 Nov 2012 09:48:44 -0800 Subject: [PATCH] Protect install of every jeepyb package. Because puppet sucks at installing packages, wrap the installation of everything that jeepyb needs in both jeepyb and in other places with if blocks. *facepalm* Change-Id: I69c73dabc3ea5d68bd057141b1ad758cdd68eafc Reviewed-on: https://review.openstack.org/17130 Reviewed-by: James E. Blair Reviewed-by: Clark Boylan Approved: Monty Taylor Tested-by: Jenkins --- modules/jeepyb/manifests/init.pp | 16 ++++++++++------ modules/lodgeit/manifests/init.pp | 9 +++++++-- modules/zuul/manifests/init.pp | 7 ++++++- 3 files changed, 23 insertions(+), 9 deletions(-) diff --git a/modules/jeepyb/manifests/init.pp b/modules/jeepyb/manifests/init.pp index 81801b86f8..2dd263c54a 100644 --- a/modules/jeepyb/manifests/init.pp +++ b/modules/jeepyb/manifests/init.pp @@ -3,13 +3,17 @@ class jeepyb ( $git_source_repo = 'https://github.com/openstack-ci/jeepyb.git', ) { - $packages = [ - 'python-mysqldb', - 'python-paramiko', - ] - package { $packages: - ensure => present, + if ! defined(Package['python-mysqldb']) { + package { 'python-mysqldb': + ensure => present, + } + } + + if ! defined(Package['python-paramiko']) { + package { 'python-paramiko': + ensure => present, + } } if ! defined(Package['Pygithub']) { diff --git a/modules/lodgeit/manifests/init.pp b/modules/lodgeit/manifests/init.pp index f9023b8bb5..fddbec3e71 100644 --- a/modules/lodgeit/manifests/init.pp +++ b/modules/lodgeit/manifests/init.pp @@ -7,8 +7,7 @@ class lodgeit { 'python-werkzeug', 'python-simplejson', 'python-pygments', - 'drizzle', - 'python-mysqldb' ] + 'drizzle'] include apache @@ -24,6 +23,12 @@ class lodgeit { ensure => present, } + if ! defined(Package['python-mysqldb']) { + package { 'python-mysqldb': + ensure => present, + } + } + package { 'SQLAlchemy': ensure => present, provider => pip, diff --git a/modules/zuul/manifests/init.pp b/modules/zuul/manifests/init.pp index f90777a8f3..6e83c52738 100644 --- a/modules/zuul/manifests/init.pp +++ b/modules/zuul/manifests/init.pp @@ -15,7 +15,6 @@ class zuul ( 'python-webob', 'python-daemon', 'python-lockfile', - 'python-paramiko', 'python-paste', ] @@ -31,6 +30,12 @@ class zuul ( } } + if ! defined(Package['python-paramiko']) { + package { 'python-paramiko': + ensure => present, + } + } + # Packages that need to be installed from pip $pip_packages = [ 'GitPython',