Merge branch 'master' into bugfix/enable_dirsrv

This commit is contained in:
Greg Karékinian
2020-05-15 17:24:04 +02:00
3 changed files with 18 additions and 8 deletions

View File

@@ -50,6 +50,7 @@ action :create do
subscribes :run, "template[#{setup_config}]", :immediately
notifies :restart, "service[#{service_name}]", :immediately
notifies :delete, "template[#{setup_config}]", :immediately
notifies :run, "execute[set base acis]", :delayed
notifies :run, "execute[add users group]", :delayed
notifies :run, "execute[disable anonymous access]", :delayed
end
@@ -66,6 +67,18 @@ action :create do
to "/lib/systemd/system/dirsrv@.service"
end
cookbook_file "#{Chef::Config[:file_cache_path]}/acis.ldif" do
source "acis.ldif"
owner "root"
group "root"
end
execute "set base acis" do
command "ldapmodify -x -w #{new_resource.admin_password} -D '#{new_resource.bind_dn}' -f '#{Chef::Config[:file_cache_path]}/acis.ldif' -p #{new_resource.port} -h localhost"
sensitive true
action :nothing
end
cookbook_file "#{Chef::Config[:file_cache_path]}/users.ldif" do
source "users.ldif"
owner "root"