-
shirenn authored34985f55
main.yml 639 B
---
- name: Install slapd
apt:
update_cache: true
name:
- slapd
register: apt_result
retries: 3
until: apt_result is succeeded
- name: Remove slapd config directory
file:
path: /etc/ldap/slapd.d/
state: absent
- name: Deploy slapd configuration
template:
src: ldap/slapd.conf.j2
dest: /etc/ldap/slapd.conf
mode: 0600
owner: openldap
group: openldap
notify: Restart slapd
- name: Deploy ldap services
lineinfile:
path: /etc/default/slapd
regexp: '^SLAPD_SERVICES='
line: 'SLAPD_SERVICES="ldaps://{{ ldap.ip }}/ ldapi:///"'
notify: Restart slapd
check_mode: no