Greg Karékinian 685deea920 Simplify dirsrv setup
Connecting directly using zerotier, no more nginx
2021-12-02 19:08:27 +01:00

26 lines
773 B
Ruby

#
# Cookbook Name:: kosmos-dirsrv
# Recipe:: default
#
credentials = data_bag_item("credentials", "dirsrv")
dirsrv_instance "master" do
hostname node['kosmos-dirsrv']['master_hostname']
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