prosody/tasks/main.yaml
changeset 138 591b6609fc64
parent 45 2d7ba960b157
child 237 c6c11084c802
--- a/prosody/tasks/main.yaml	Sat Sep 05 19:27:02 2020 -0500
+++ b/prosody/tasks/main.yaml	Sat Sep 05 21:31:59 2020 -0500
@@ -20,19 +20,17 @@
   template: src="prosody.cfg.lua.j2" dest="/etc/prosody/conf.avail/{{prosody_vhost}}.cfg.lua"
   notify: restart prosody
 
-- name: copy ssl keys
+- name: install letsencrypt ssl deploy hook
   become: yes
   copy:
-    src: "{{item}}"
-    dest: "{{prosody_ssl_dir}}/"
-    remote_src: yes
-    mode: "0640"
-    owner: "root"
-    group: "prosody"
+    src: "prosody.sh"
+    dest: "/etc/letsencrypt/renewal-hooks/deploy/prosody.sh"
+    mode: "0755"
+
+- name: run letsencrypt ssl deploy hook
+  become: yes
+  command: "/etc/letsencrypt/renewal-hooks/deploy/prosody.sh"
   notify: restart prosody
-  loop:
-    - "{{prosody_ssl_privkey_src}}"
-    - "{{prosody_ssl_cert_src}}"
 
 - name: install db schema file
   become: yes