Fix fresh dirsrv installs on Ubuntu 20.04
This commit is contained in:
@@ -3,10 +3,12 @@
|
||||
# Recipe:: default
|
||||
#
|
||||
|
||||
include_recipe "kosmos-dirsrv::hostsfile"
|
||||
|
||||
credentials = data_bag_item("credentials", "dirsrv")
|
||||
|
||||
dirsrv_instance "master" do
|
||||
hostname node['kosmos-dirsrv']['master_hostname']
|
||||
hostname "ldap.kosmos.local"
|
||||
admin_password credentials['admin_password']
|
||||
suffix "dc=kosmos,dc=org"
|
||||
end
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
#
|
||||
# Cookbook:: kosmos-dirsrv
|
||||
# Recipe:: hostsfile
|
||||
#
|
||||
|
||||
dirsrv_primary = search(:node, "role:dirsrv_primary AND chef_environment:#{node.chef_environment}").first
|
||||
|
||||
unless dirsrv_primary.nil?
|
||||
primary_ip = dirsrv_primary['knife_zero']['host']
|
||||
|
||||
hostsfile_entry primary_ip do
|
||||
hostname "ldap.kosmos.local"
|
||||
unique true
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user