# # Cookbook Name:: kosmos-dirsrv # Recipe:: default # include_recipe "kosmos-dirsrv::hostsfile" 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