Skip to content
Browse files

sorted out Ubuntu dependencies, still a lot of steps for getting it t…

…o work
  • Loading branch information...
1 parent 24226fd commit 66c6098125d07207440fd4671edf99277e39b0cf @mattray mattray committed with schisamo Mar 25, 2011
Showing with 23 additions and 23 deletions.
  1. +1 −1 openldap/metadata.rb
  2. +22 −22 openldap/recipes/server.rb
View
2 openldap/metadata.rb
@@ -3,7 +3,7 @@
license "Apache 2.0"
description "Configures a server to be an OpenLDAP master, replication slave or client for auth"
long_description IO.read(File.join(File.dirname(__FILE__), 'README.rdoc'))
-version "0.9.3"
+version "0.9.4"
recipe "openldap", "Empty, use one of the other recipes"
recipe "openldap::auth", "Set up openldap for user authentication"
recipe "openldap::client", "Install openldap client packages"
View
44 openldap/recipes/server.rb
@@ -19,32 +19,33 @@
include_recipe "openldap::client"
case node[:platform]
-when "debian","ubuntu"
+when "ubuntu"
+ if (node[:platform_version].to_f >= 10.04)
+ package "db4.8-util" do
+ action :upgrade
+ end
+ else
+ package "db4.2-util" do
+ action :upgrade
+ end
+ end
cookbook_file "/var/cache/local/preseeding/slapd.seed" do
source "slapd.seed"
- mode 0600
+ mode 0600
owner "root"
group "root"
end
-end
-
-package "db4.2-util" do
- action :upgrade
-end
-
-cookbook_file "/var/cache/local/preseeding/slapd.seed" do
- source "slapd.seed"
- mode 0600
- owner "root"
- group "root"
-end
-
-package "slapd" do
- case node[:platform]
- when "debian","ubuntu"
- response_file "/var/cache/local/preseeding/slapd.seed"
+ package "slapd" do
+ response_file "slapd.seed"
+ action :upgrade
+ end
+else
+ package "db4.2-util" do
+ action :upgrade
+ end
+ package "slapd" do
+ action :upgrade
end
- action :upgrade
end
cookbook_file "#{node[:openldap][:ssl_dir]}/#{node[:openldap][:server]}.pem" do
@@ -58,8 +59,7 @@
action [:enable, :start]
end
-case node[:lsb][:codename]
-when "intrepid","jaunty"
+if (node[:platform] == "ubuntu") and (node[:platform_version].to_f >= 8.10)
template "/etc/default/slapd" do
source "default_slapd.erb"
owner "root"

0 comments on commit 66c6098

Please sign in to comment.
Something went wrong with that request. Please try again.