prosody/tasks/main.yaml
changeset 23 b4ad03deace1
child 44 aaf10cecfc1f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/prosody/tasks/main.yaml	Thu May 14 08:25:10 2020 -0500
@@ -0,0 +1,26 @@
+---
+
+- name: install prosody
+  become: yes
+  apt: name="prosody"
+  notify: restart prosody
+
+- name: configure prosody
+  become: yes
+  template:
+    src: "prosody.cfg.lua.j2"
+    dest: "/etc/prosody/conf.avail/{{prosody_vhost}}.cfg.lua"
+  notify: restart prosody
+
+- name: install prosody site
+  become: yes
+  template: src="prosody.cfg.lua.j2" dest="/etc/prosody/conf.avail/{{prosody_vhost}}.cfg.lua"
+  notify: restart prosody
+
+- name: enable prosody site
+  become: yes
+  file:
+    src:  "/etc/prosody/conf.avail/{{prosody_vhost}}.cfg.lua"
+    dest: "/etc/prosody/conf.d/{{prosody_vhost}}.cfg.lua"
+    state: "link"
+  notify: restart prosody