# HG changeset patch # User Luke Hoersten # Date 1589462710 18000 # Node ID b4ad03deace129a4980c1776034fe159fcaff668 # Parent adeda2afeb756e5941372346d02ac346af90bf2c Added prosody role. diff -r adeda2afeb75 -r b4ad03deace1 prosody/defaults/main.yaml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/prosody/defaults/main.yaml Thu May 14 08:25:10 2020 -0500 @@ -0,0 +1,1 @@ +--- diff -r adeda2afeb75 -r b4ad03deace1 prosody/handlers/main.yaml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/prosody/handlers/main.yaml Thu May 14 08:25:10 2020 -0500 @@ -0,0 +1,5 @@ +--- + +- name: restart prosody + become: yes + systemd: name="prosody.service" enabled="yes" daemon_reload="yes" diff -r adeda2afeb75 -r b4ad03deace1 prosody/tasks/main.yaml --- /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 diff -r adeda2afeb75 -r b4ad03deace1 prosody/templates/prosody.cfg.lua.j2 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/prosody/templates/prosody.cfg.lua.j2 Thu May 14 08:25:10 2020 -0500 @@ -0,0 +1,20 @@ +VirtualHost "{{prosody_vhost}}" + ssl = { + key = "{{prosody_ssl_privkey}}"; + certificate = "{{prosody_ssl_cert}}"; + } + +------ Components ------ +-- You can specify components to add hosts that provide special services, +-- like multi-user conferences, and transports. +-- For more information on components, see http://prosody.im/doc/components + +-- Set up a MUC (multi-user chat) room server on conference.example.com: +--Component "conference.example.com" "muc" + +-- Set up a SOCKS5 bytestream proxy for server-proxied file transfers: +--Component "proxy.example.com" "proxy65" + +---Set up an external component (default component port is 5347) +--Component "gateway.example.com" +-- component_secret = "password"