[Ovirt-devel] [PATCH server] set ldap_dn in ldap.yml to support other hosts than management.priv.ovirt.org
Joey Boggs
jboggs at redhat.com
Wed Feb 4 15:44:15 UTC 2009
---
installer/bin/ovirt-installer | 5 +++--
installer/modules/ovirt/manifests/ovirt.pp | 12 +++++++++++-
2 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/installer/bin/ovirt-installer b/installer/bin/ovirt-installer
index 65dc522..2c1e8ae 100755
--- a/installer/bin/ovirt-installer
+++ b/installer/bin/ovirt-installer
@@ -191,7 +191,7 @@ realm_name = prompt_for_answer("Enter your realm name (example: example.com):",
freeipa_password = prompt_for_answer("NOTE: The following pasword will also be you ovirtadmin password for the web management login\n\
Enter an administrator password for FreeIPA:", :password => true)
-ldap_dn = "cn=ipaConfig,cn=etc,"
+ldap_dn = ""
ldap_dn_temp = realm_name.split(".")
ldap_dn_temp.each do |i|
ldap_dn += "dc=#{i},"
@@ -262,7 +262,8 @@ $db_password = '<%= db_password %>'
# FreeIPA configuration
$realm_name = '<%= realm_name %>'
$freeipa_password = '<%= freeipa_password %>'
-$ldap_dn = '<%= ldap_dn %>'
+$short_ldap_dn = '<%= ldap_dn %>'
+$ldap_dn = 'cn=ipaConfig,cn=etc,<%= ldap_dn %>'
<% if cobbler_setup == "n" %>
include cobbler::bundled
diff --git a/installer/modules/ovirt/manifests/ovirt.pp b/installer/modules/ovirt/manifests/ovirt.pp
index c9d3aee..cf62bdb 100644
--- a/installer/modules/ovirt/manifests/ovirt.pp
+++ b/installer/modules/ovirt/manifests/ovirt.pp
@@ -82,9 +82,19 @@ class ovirt::setup {
single_exec { "create_ovirtadmin_acct" :
command => "/usr/share/ovirt-server/script/grant_admin_privileges ovirtadmin",
- require => Single_Exec[db_migrate]
+ require => [Single_Exec[db_migrate],Single_exec[set_ldap_hostname],Single_exec[set_ldap_dn]]
}
+ single_exec { "set_ldap_hostname" :
+ command => "/bin/sed -i -e 's/management.priv.ovirt.org/$ipa_host/' /usr/share/ovirt-server/config/ldap.yml",
+ require => Package[ovirt-server]
+ }
+
+ single_exec { "set_ldap_dn" :
+ command => "/bin/sed -i -e 's/dc=priv,dc=ovirt,dc=org/$short_ldap_dn/' /usr/share/ovirt-server/config/ldap.yml",
+ require => Package[ovirt-server]
+ }
+
single_exec { "add_host" :
command => "/usr/bin/ovirt-add-host $ipa_host /usr/share/ovirt-server/ovirt.keytab",
require => Package[ovirt-server]
--
1.6.0.6
More information about the ovirt-devel
mailing list