diff --git a/modules/nodepool/manifests/init.pp b/modules/nodepool/manifests/init.pp index c05dae5a52..a4b6ca2593 100644 --- a/modules/nodepool/manifests/init.pp +++ b/modules/nodepool/manifests/init.pp @@ -30,12 +30,12 @@ class nodepool ( $environment = {}, ) { - $packages = [ - 'python-lxml', # needed by python-keystoneclient, has system bindings - ] - - package { $packages: - ensure => present, + # needed by python-keystoneclient, has system bindings + # Zuul and Nodepool both need it, so make it conditional + if ! defined(Package['python-lxml']) { + package { 'python-lxml': + ensure => present, + } } class { 'mysql::server': diff --git a/modules/zuul/manifests/init.pp b/modules/zuul/manifests/init.pp index 06bb0ef17e..59bcd3f6b7 100644 --- a/modules/zuul/manifests/init.pp +++ b/modules/zuul/manifests/init.pp @@ -54,7 +54,6 @@ class zuul ( $packages = [ 'gcc', # yappi requires this to build 'python-lockfile', - 'python-lxml', # needed by python-keystoneclient, has system bindings 'python-paste', 'python-webob', ] @@ -69,6 +68,14 @@ class zuul ( require => Class['pip'], } + # needed by python-keystoneclient, has system bindings + # Zuul and Nodepool both need it, so make it conditional + if ! defined(Package['python-lxml']) { + package { 'python-lxml': + ensure => present, + } + } + # A lot of things need yaml, be conservative requiring this package to avoid # conflicts with other modules. if ! defined(Package['python-yaml']) {