From 607f653a9ee2bd1983380843c7bcdad4cc0b4303 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Tue, 25 Sep 2012 20:47:38 -0700 Subject: [PATCH] Be conservative requiring python-yaml. A lot of modules require python-yaml. Be conservative requiring this package to avoid conflicts when two or more of these modules end up being used on the same host. Change-Id: I35bf4f1070e6f248734c593e9277b737166904c1 Reviewed-on: https://review.openstack.org/13688 Reviewed-by: James E. Blair Reviewed-by: Paul Belanger Approved: Monty Taylor Reviewed-by: Monty Taylor Tested-by: Jenkins --- modules/jenkins/manifests/job_builder.pp | 8 ++++++-- modules/zuul/manifests/init.pp | 10 +++++++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/modules/jenkins/manifests/job_builder.pp b/modules/jenkins/manifests/job_builder.pp index bdae7d2962..8721db9520 100644 --- a/modules/jenkins/manifests/job_builder.pp +++ b/modules/jenkins/manifests/job_builder.pp @@ -4,8 +4,12 @@ class jenkins::job_builder ( $password, ) { - package { 'python-yaml': - ensure => "present", + # A lot of things need yaml, be conservative requiring this package to avoid + # conflicts with other modules. + if ! defined(Package['python-yaml']) { + package { 'python-yaml': + ensure => "present", + } } package { "python-jenkins": diff --git a/modules/zuul/manifests/init.pp b/modules/zuul/manifests/init.pp index be35a0fc3b..3e4f859954 100644 --- a/modules/zuul/manifests/init.pp +++ b/modules/zuul/manifests/init.pp @@ -12,12 +12,20 @@ class zuul ( "python-lockfile", "python-paramiko", "python-paste", - "python-yaml"] + ] package { $packages: ensure => "present", } + # A lot of things need yaml, be conservative requiring this package to avoid + # conflicts with other modules. + if ! defined(Package['python-yaml']) { + package { 'python-yaml': + ensure => "present", + } + } + # Packages that need to be installed from pip $pip_packages = ["GitPython"]