Allow zuul & nodepool to be installed on one VM

When attempting to install zuul & nodepool on a single machine
 (typical for third party environments) you get the following error:

Duplicate declaration: Package[python-lxml] is already declared in file
/root/config/modules/zuul/manifests/init.pp at line 64;
 cannot redeclare at /root/config/modules/nodepool/manifests/init.pp:39 on node ci.novalocal

Update the puppet scripts so that python-lxml do not conflict with each other.

Change-Id: I63453e46702d37fa845504f31fa006b0b9fc5330
This commit is contained in:
Ramy Asselin 2014-08-22 13:16:31 -07:00
parent 32b5459657
commit 46518a0523
2 changed files with 14 additions and 7 deletions

View File

@ -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':

View File

@ -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']) {