slapd: ensure certificate directory exists

This commit is contained in:
Markus 2021-08-16 21:34:02 +02:00
parent cdfd65e83f
commit 51065764da

View File

@ -28,6 +28,9 @@
template: src=slapd.conf.j2 dest=/etc/ldap/slapd.conf
notify: Restart slapd
- name: Create certificate directory
file: path=/etc/ldap/ssl state=directory mode=0755
- name: Ensure certificates are available
command: openssl req -x509 -nodes -newkey rsa:2048 -keyout /etc/ldap/ssl/srv.key -out /etc/ldap/ssl/srv.crt -days 730 -subj "/CN={{ slapd_hostname }}" creates=/etc/ldap/ssl/srv.crt
notify: Restart slapd