2016-03-23 12:14:18 +01:00
|
|
|
---
|
|
|
|
|
|
|
|
- name: Install slapd
|
|
|
|
apt: name={{ item }} state=present
|
|
|
|
with_items:
|
|
|
|
- slapd
|
|
|
|
- slapd-smbk5pwd
|
|
|
|
tags: ldap
|
|
|
|
|
|
|
|
- name: Remove slapd.d
|
|
|
|
file: path=/etc/ldap/slapd.d state=absent
|
|
|
|
notify: Restart slapd
|
|
|
|
tags: ldap
|
|
|
|
|
|
|
|
- name: Copy schema definitons
|
|
|
|
copy: src={{ item }} dest=/etc/ldap/{{ item }}
|
|
|
|
with_items:
|
|
|
|
- schema/radius.schema
|
|
|
|
- schema/samba.schema
|
|
|
|
- schema/kitchen.schema
|
|
|
|
notify: Restart slapd
|
|
|
|
tags: ldap
|
|
|
|
|
2016-04-01 18:37:02 +02:00
|
|
|
- name: Configure slapd (init script)
|
|
|
|
copy: src=slapd dest=/etc/default/slapd
|
|
|
|
tags: ldap
|
|
|
|
|
2016-03-23 12:14:18 +01:00
|
|
|
- name: Configure slapd
|
|
|
|
template: src=slapd.conf.j2 dest=/etc/ldap/slapd.conf
|
|
|
|
notify: Restart slapd
|
|
|
|
tags: ldap
|
|
|
|
|
2016-03-24 11:43:40 +01:00
|
|
|
- name: Ensure certificates are available
|
|
|
|
command: openssl req -x509 -nodes -newkey rsa:2048 -keyout /etc/ldap/ssl/ldapm.key -out /etc/ldap/ssl/ldapm.crt -days 730 -subj "/CN=ldapm.binary.kitchen" creates=/etc/ldap/ssl/ldapm.crt
|
|
|
|
notify: Restart slapd
|
|
|
|
tags: nginx
|
|
|
|
|
2016-03-23 12:14:18 +01:00
|
|
|
- name: Start slapd
|
|
|
|
service: name=slapd state=started enabled=yes
|
|
|
|
tags: ldap
|