diff --git a/roles/slapd/tasks/main.yml b/roles/slapd/tasks/main.yml index 8a63c9d..954547c 100644 --- a/roles/slapd/tasks/main.yml +++ b/roles/slapd/tasks/main.yml @@ -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