diff --git a/files/le_restart_slapd.sh b/files/le_restart_slapd.sh new file mode 100644 index 0000000..38fd65b --- /dev/null +++ b/files/le_restart_slapd.sh @@ -0,0 +1,3 @@ +#! /bin/bash + +/bin/systemctl restart slapd diff --git a/tasks/main.yml b/tasks/main.yml index b67c066..fd2afd6 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -194,6 +194,13 @@ ansible.builtin.file: path: /root/ssl.ldif state: absent + + - name: restart slapd upon certificate renewal + ansible.builtin.copy: + src: le_restart_slapd.sh + dest: /etc/letsencrypt/renewal-hooks/post/service_slapd.sh + mode: 0700 + when: ldap_have_ssl - name: configure ldap aliases - 0/1