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,13 +30,13 @@ class nodepool (
$environment = {}, $environment = {},
) { ) {
$packages = [ # needed by python-keystoneclient, has system bindings
'python-lxml', # 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':
package { $packages:
ensure => present, ensure => present,
} }
}
class { 'mysql::server': class { 'mysql::server':
config_hash => { config_hash => {

View File

@ -54,7 +54,6 @@ class zuul (
$packages = [ $packages = [
'gcc', # yappi requires this to build 'gcc', # yappi requires this to build
'python-lockfile', 'python-lockfile',
'python-lxml', # needed by python-keystoneclient, has system bindings
'python-paste', 'python-paste',
'python-webob', 'python-webob',
] ]
@ -69,6 +68,14 @@ class zuul (
require => Class['pip'], 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 # A lot of things need yaml, be conservative requiring this package to avoid
# conflicts with other modules. # conflicts with other modules.
if ! defined(Package['python-yaml']) { if ! defined(Package['python-yaml']) {