Râu Cao 991458208d
Use a role for configuring LDAP hostname on clients
This way it's also easy to converge all LDAP clients at once.
2022-11-26 16:45:45 +01:00

26 lines
752 B
Ruby

#
# Cookbook Name:: kosmos-dirsrv
# Recipe:: default
#
credentials = data_bag_item("credentials", "dirsrv")
dirsrv_instance "master" do
hostname "ldap.kosmos.local"
admin_password credentials['admin_password']
suffix "dc=kosmos,dc=org"
end
# FIXME: The firewall and backup recipes do not work in the custom resource, so
# the code lives here for now. The issue is described here, but I think messing
# with the run context is confusing:
#
# https://github.com/chef-cookbooks/firewall/issues/134
include_recipe "kosmos-dirsrv::firewall"
unless node.chef_environment == "development"
# backup the data dir and the config files
node.override["backup"]["archives"]["dirsrv"] = ["/etc/dirsrv", "/var/lib/dirsrv"]
include_recipe "backup"
end