From e03c2b623eab15f9f61cd9fa3c08af35afd072b8 Mon Sep 17 00:00:00 2001 From: 7u83 <7u83@mail.ru> Date: Wed, 29 Jul 2020 14:48:27 +0000 Subject: [PATCH] Creates an ads contextentry and sets shutdownport to 0 --- apacheds/init.sls | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/apacheds/init.sls b/apacheds/init.sls index db0b247..ef1502f 100644 --- a/apacheds/init.sls +++ b/apacheds/init.sls @@ -37,7 +37,7 @@ Apache Directory Server Config: ads_home: {{ads.opt_dir}}/ads java_home: {{java.java_home}} java_opts: "" - ads_shutdown_port: "" + ads_shutdown_port: "0" ads_instances: {{ads.instances}} - require: - AdsDirs @@ -59,7 +59,16 @@ ADS Instance{{key}} Log Props: - template: jinja - defaults: log_file: "/tmp/{{key}}.log" + + + # Create a base 64 encoded ads-contextentry + # see: https://directory.apache.org/apacheds/basic-ug/1.4.3-adding-partition.html + {% + set ads_contextentry = "dn: "+'dc=planix,dc=org\n'+"dc: "+key+"\n"+ + "objectclass: domain\nobjectclass: top\n\n" + %} + {%- if not salt['file.file_exists' ](ads.instances +"/" + key + "/conf/config.ldif_migrated") %} ADS Instance{{key}} New Conf Dir: file.managed: @@ -70,7 +79,7 @@ ADS Instance{{key}} New Conf Dir: partitionid: tube partitionsuffix: "dc=planix,dc=org" ldap_port: 12389 - ads_contextentry: "" + ads_contextentry: "{{ads_contextentry | base64_encode }}" {%- endif %} {% endfor %}