Compare commits

..

No commits in common. "80df959c51c01b7460c4be46c7b0a315203d5379" and "858ab0815dd3f55d99366e974be247801e4f5f41" have entirely different histories.

1 changed files with 4 additions and 63 deletions

View File

@ -6,8 +6,6 @@
include:
- plnx.java
Apache Directory Server:
archive.extracted:
- name: {{ads.opt_dir}}
@ -39,7 +37,7 @@ Apache Directory Server Config:
ads_home: {{ads.opt_dir}}/ads
java_home: {{java.java_home}}
java_opts: ""
ads_shutdown_port: "0"
ads_shutdown_port: ""
ads_instances: {{ads.instances}}
- require:
- AdsDirs
@ -61,19 +59,9 @@ ADS Instance{{key}} Log Props:
- template: jinja
- defaults:
log_file: "/tmp/{{key}}.log"
{%- if not salt['file.file_exists' ](ads.instances +"/" + key + "/conf/config.ldif_migrated") %}
# 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"
%}
ADS_Instance{{key}}:
{%- if not salt['file.file_exists' ](ads.instances +"/" + key + "/conf/config.ldif_migrated") %}
ADS Instance{{key}} New Conf Dir:
file.managed:
- name: "{{ads.instances}}/{{key}}/conf/config.ldif"
- source: "salt://plnx/apacheds/templates/config.ldif.jinja"
@ -82,56 +70,9 @@ ADS_Instance{{key}}:
partitionid: tube
partitionsuffix: "dc=planix,dc=org"
ldap_port: 12389
ads_contextentry: "{{ads_contextentry | base64_encode }}"
ADS_Log_Dir{{key}}:
file.directory:
- name: "{{ads.instances}}/{{key}}/log"
- require:
- ADS_Instance{{key}}
ADS_Run_Dir{{key}}:
file.directory:
- name: "{{ads.instances}}/{{key}}/run"
- require:
- ADS_Instance{{key}}
#ADS_Start_Srvice{{key}}:
#include:
# - plnx.apacheds.myservice
# - require:
# - ADS_Instance{{key}}
ADS_Init_LDAP{{key}}:
ldap.managed:
- connect_spec:
url: 'ldap://localhost:12389'
bind:
method: simple
dn: 'uid=admin,ou=system'
password: 'secret'
- entries:
- 'uid=admin,ou=system':
- replace:
uid:
- admin
userPassword: ['123456' ]
- require:
- ADS_Start{{key}}
ads_contextentry: ""
{%- endif %}
ADS_Start{{key}}:
cmd.run:
- name: "/opt/ads/bin/apacheds.sh {{key}} start && sleep 30"
- require:
- ADS_Instance{{key}}
{% endfor %}
{% endfor %}