From c7bc0435228ece44f17b32bd2dea95a37a403ef0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20M=E4kinen?= Date: Fri, 22 Oct 2010 22:44:40 +0300 Subject: [PATCH] Fixed ldap::client::ruby for ubuntu and removed depencies for ldap_basedn variable. --- ldap/manifests/init.pp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/ldap/manifests/init.pp b/ldap/manifests/init.pp index 62335ca..f631bf8 100644 --- a/ldap/manifests/init.pp +++ b/ldap/manifests/init.pp @@ -61,7 +61,7 @@ class ldap::client { # Install python ldap bindings. # -class ldap::client::python inherits ldap::client { +class ldap::client::python { package { "python-ldap": name => $operatingsystem ? { @@ -76,9 +76,19 @@ class ldap::client::python inherits ldap::client { # Install Ruby ldap bindings. # -class ldap::client::ruby inherits ldap::client { +class ldap::client::ruby { + + case $operatingsystem { + ubuntu: { + $pkgname = regsubst($rubyversion, '^([0-9]+\.[0-9]+)\..*', 'libldap-ruby\1') + } + default: { + $pkgname = "ruby-ldap" + } + } package { "ruby-ldap": + name => $pkgname, ensure => installed, }