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"]