Install correct Python YAML package on CentOS/RH.

* modules/jeepyb/manifests/init.pp: Special-case the
Python YAML bindings package name depending on facter osfamily.

Change-Id: Iaa11e601e387428040a5d992219bd67812d8bac8
Reviewed-on: https://review.openstack.org/28652
Approved: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Tested-by: Jenkins
This commit is contained in:
Jeremy Stanley 2013-05-09 03:28:11 +00:00 committed by Jenkins
parent fdc8fd45bb
commit fc45733756
1 changed files with 17 additions and 3 deletions

View File

@ -37,9 +37,23 @@ class jeepyb (
# 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,
case $::osfamily {
'Debian': {
if ! defined(Package['python-yaml']) {
package { 'python-yaml':
ensure => present,
}
}
}
'RedHat': {
if ! defined(Package['PyYAML']) {
package { 'PyYAML':
ensure => present,
}
}
}
default: {
fail("Unsupported osfamily: ${::osfamily} The 'jeepyb' module only supports osfamily Debian or RedHat.")
}
}